Vote count:
0
So we have a string of digits, lets say:
1234567890
we would like to encrypt this with a number. the encrypted string is supposed capturable, and should be obfusciated
Lets say this string has one digit, lets say the 1 (one) which changes to for example 2.
After encryption the string has to be obfusciated, and not just changing the first digit from 2 tot 8 or something
So we are doing some research and are looking at 3DES
we take the approach of k1=k3 and k2
so
k1 = 1111111111 k2 = 2222222222 k3 = k1 encryptedString = encryptk1(decryptk2(encryptk3(message)))
so k2 is our public key, and k1 and k3 are the private keys.
Now we are looking for an algoritm that encrypts the message the right way:
at this time we made it simple for us, so we did:
(message[0] + k1[0]).substr(length-1,1)
So we take the last digit of the result. But this is working as folows.
When the message[0] changes, the encryptedmessage[0] changes, but the rest of the string isnt so obviously this isnt a workable approach.
So im asking to you, what ways are thinkable about encrypting this string the right way? It should be a simple algorithm since it has to be run on embedded hardware.
Thanks in advance,
Best way to encrypt string of digits
Aucun commentaire:
Enregistrer un commentaire