Encription is too long - Advice please

  • Thread starter Thread starter Washington
  • Start date Start date
W

Washington

Hi,

I am using MD5, SHA1, SHA256, SHA384, SHA512 and results are:

I am using Encryption data with salt example
(http://www.obviex.com/samples/EncryptionWithSalt.aspx)

Everything works and results are:
MD5 : G+bfg1UoPgaSVABFpLFZzxQ+h6WZkw==
SHA1 : gi4jz/elgpXY9fvxAo/HOMw9XPc80aZYEg==
SHA256: jm1YCvn5CuluseY2PtQLbZDfPgLXtRjTypj1EPf/pHta2n7B7r0=
SHA384:
FzSCLzDw1b+JZNX4D+hoNJIcbMhHY/Plf7wooBKu9NHFXQzGC5TAbY1wrjyFeiqJPNaxaNctIg==
SHA512:
h+KRwibmpSrljPRWUX8IAW0Yy1udohEYK+nsJYU3u0icgSiGxwtiO5IZt9i+oRXm4e1qgCjz3jT9yo1rcLG1ie9ptIs=

These results are too long for my purposes. I would like to generate key for
application. It must be readable for user, desirable objective is something
like this: AS344-SADAD-ASA44-ALKLH-GHNNG

Anyway, I can use shapes like above (G+bfg1UoPgaSVABFpLFZzxQ+h6WZkw==) and I
can put dashes (-) between but It should be more shorter and capital. User
should got this number on paper and need to write that into application on
first start (setup)

What kind of encryption I should use and how?

Please, give me advise and tell me how to do that. If is possible point me
on some real code example?

Thanks to all.

:)
 
try minimum block size (i think its 8byte for rijndael algorithm.) and
"implement your own base64 string convertion"
 
These results are too long for my purposes. I would like to generate key for
application. It must be readable for user, desirable objective is something
like this: AS344-SADAD-ASA44-ALKLH-GHNNG

How about using GUIDs?

Regards,
Sarin.
 
Washington said:
I am using MD5, SHA1, SHA256, SHA384, SHA512 and results are:

<snip>

How much data are you trying to encrypt? MD5 and SHA aren't really
encryption - they're hashes. You won't be able to get back the original
data from the hash. What are you actually trying to achieve here?
What's the bigger picture? If you're just trying to generate a random
key, I'd go with GUIDs as suggested by another poster.

Jon
 
It is true. SHA isn't encryption and it is not good for this what I want.

I am trying to make a key for product on the "salt" way. For example if
encrypting Hello World string we will get:

Encrypted #0: RZgqk+ZCpDtkz1seyKP/AhL+vheicchZEBWfG5gOHyg=
Encrypted #1: NetGFd9SBC+9vJQ1MGLih3szfcJ3GwugdjKhEsIdrCs=
Encrypted #2: CSAFtGmfus77c2tMmsu9JohymMLPNyZtntHeTm0zsPQ=
Encrypted #3: +iB/LfwCalGuIUvvClikpBmyL8l4NaoZ3lS45nBjZTI=
Encrypted #4: 6+z3cKo4t9vHNaMZboUdfW8T3nRpxGFQ6pKJ/67sSYA=
Encrypted #5: sv90H5pRYpCPUJfcRfcXGEJUETIJRonjjc+GxWnzFHI=
Encrypted #6: A0WR0tifcS5Pqd36aA42E401O9tni52rdDuHeJ15yrM=
Encrypted #7: 3tKjoxGRvM/m/4MBV1XXiE6yXBeCE071oTsRjAKixRM=
Encrypted #8: 5u5pWZWT8HjKDtfpUfNfzwkU0+BnKokjyiil5HPlqKA=
Encrypted #9: 0qMlj+391fSn+Vv0TjtwJ7QLbSGMYBHuHUTqYej397k=
Encrypted #10: KdCWxE9CxZ1LyokdH5+uu5kNSYW0cXiLqPhwoxucFXU=

It is the same thing (Hello World) on ten different ways and it is exactly
what I want and it works. In this example Rijndel encryption is aplied, with
added salt value (randomly generated bytes) to plain text before the value
is encrypted.

Problem:
This key is too long and it is where problem is, user need something
readable, for e.g. DSDSD-SAA78-SA98A-OPOKK-798JL
It is to hard to write something like this
sv90H5pRYpCPUJfcRfcXGEJUETIJRonjjc+GxWnzFHI= sign by sign :( and I can not
expect that from users.

May be, just may be somewhere solution exists and may be is not necessary to
make a lot of code for that. For e.g. I can capital all leters but how I can
now to make coversation later...

Thanks :)



For
 
Washington said:
Problem:
This key is too long and it is where problem is, user need something
readable, for e.g. DSDSD-SAA78-SA98A-OPOKK-798JL
It is to hard to write something like this
sv90H5pRYpCPUJfcRfcXGEJUETIJRonjjc+GxWnzFHI= sign by sign :( and I can not
expect that from users.

If you only want the users to enter a small amount of encrypted text
(and using a relatively small set of characters) then you can't expect
to be able to decrypt it to a large amount of original text.
 
Back
Top