473,769 Members | 5,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hiding crypto key sin an assemnly...

Does anyone have any good ideas for hiding a DES key (byte array) from
prying eyes inside of an assembly or is obfuscation the only way?
Right now in my test code I am using a simple array of bytes for my key and
nit vector, but when I try the reflector tool to look at the assembly this
sticks out clear as daylight.

My first thought was to maybe embed a bitmap into the assembly as a resource
that has the bytes set as what I need then I can load the bitmap and read
the bytes from there.

Any other ideas?
Jul 21 '05 #1
3 1495
"Ray Cassick \(Home\)" <rc************ @enterprocity.c om> wrote in
news:#L******** ******@TK2MSFTN GP10.phx.gbl:
Does anyone have any good ideas for hiding a DES key (byte array) from
prying eyes inside of an assembly or is obfuscation the only way?


Obfuscation. But choose wisely, some of them are not very good.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Empower ASP.NET with IntraWeb
http://www.atozed.com/IntraWeb/
Jul 21 '05 #2
Security through obscurity? Not a good idea. No matter where you hide the
key, it can be found. As soon as it's been found once, that information can
be passed around to compromise every single installation of your software.

What are you using the key for? With that information it will be easier for
people to provide good answers.

Colin

"Ray Cassick (Home)" <rc************ @enterprocity.c om> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Does anyone have any good ideas for hiding a DES key (byte array) from
prying eyes inside of an assembly or is obfuscation the only way?
Right now in my test code I am using a simple array of bytes for my key and nit vector, but when I try the reflector tool to look at the assembly this
sticks out clear as daylight.

My first thought was to maybe embed a bitmap into the assembly as a resource that has the bytes set as what I need then I can load the bitmap and read
the bytes from there.

Any other ideas?

Jul 21 '05 #3
The key will be used for encrypting a license file.

I understand what you are saying though... I guess just the thoughts of
hading over my code to be mangled up (obfuscated) is still a bit hard to
take.
"Colin Young" <x@nospam.com > wrote in message
news:uo******** ******@TK2MSFTN GP11.phx.gbl...
Security through obscurity? Not a good idea. No matter where you hide the
key, it can be found. As soon as it's been found once, that information can be passed around to compromise every single installation of your software.

What are you using the key for? With that information it will be easier for people to provide good answers.

Colin

"Ray Cassick (Home)" <rc************ @enterprocity.c om> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Does anyone have any good ideas for hiding a DES key (byte array) from
prying eyes inside of an assembly or is obfuscation the only way?
Right now in my test code I am using a simple array of bytes for my key

and
nit vector, but when I try the reflector tool to look at the assembly this sticks out clear as daylight.

My first thought was to maybe embed a bitmap into the assembly as a

resource
that has the bytes set as what I need then I can load the bitmap and read the bytes from there.

Any other ideas?


Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1890
by: Stu | last post by:
Hi, Im reading a file in from disk as a byte array then passing it to a memory stream for decryption using crypto api functions. What I have found is that you need to reduce the array length by 2 from the original lenght in order to get it to work as there seems to be 2 extra 0 bytes at the end. Functions included Stu
4
2801
by: sam | last post by:
Hi, Is there any way I can prevent people use some binary disambler (eg. strings in unix) to view the const string value in a compiled C++ program? Sam.
2
3791
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to produce two messages having the same message digest. That conjecture is false, as demonstrated by Wang, Feng, Lai and Yu in 2004 . Just recently, Wang, Yu, and Lin showed a short- cut solution for finding collisions in SHA-1 . Their result
6
6581
by: Michael Sparks | last post by:
Hi, I suspect this is a bug with AMK's Crypto package from http://www.amk.ca/python/code/crypto , but want to check to see if I'm being dumb before posting a bug report. I'm looking at using this library and to familiarise myself writing small tests with each of the ciphers. When I hit Crypto.Cipher.ARC4 I've
13
2001
by: Andy Chau | last post by:
I try to use RSA to implement the following scheme but wasn't sucessful. Sever encrypt a message using a public key, the client decrpyt the message using a private key. I don't want the client to be able to encrypt a message. However, using the Crypto API I need to pass in both the private and public key pairs in order to decrypt the message. When the client has both private and public key, it can just use the public
3
360
by: Ray Cassick \(Home\) | last post by:
Does anyone have any good ideas for hiding a DES key (byte array) from prying eyes inside of an assembly or is obfuscation the only way? Right now in my test code I am using a simple array of bytes for my key and nit vector, but when I try the reflector tool to look at the assembly this sticks out clear as daylight. My first thought was to maybe embed a bitmap into the assembly as a resource that has the bytes set as what I need then...
5
3760
by: vermarajeev | last post by:
Hi guys, I want to encrypt/decrypt a file with AES in CTR mode using crypto++ library. To encrypt a file using AES in CTR mode the solution is something like this int CRYPTOPP_API main(int argc, char *argv) { std::string command, executableName, macFilename;
2
2503
by: vermarajeev | last post by:
Hi guys, I have written code to encrypt and decrypt files using perl script. Please help me to port below code to crypto++ library. //ENCRYPTION my $cipher = Crypt::CBC->new( -cipher => "Crypt::Rijndael", -key => $key, -header => 'salt', );
12
2260
by: Fett | last post by:
I need a crypto package that works on windows with python 2.5. Can anyone suggest one for me? I have been searching for a couple days for a good cryptography package to use for public/private key encryption, at this point I would settle for symmetric even. Every encryption package I have found for python was either operating system specific (read *nix only): http://www.freenet.org.nz/ezPyCrypto/
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.