If you want other people to help you, either also include B4XEncryption when you post your problems, or let them know what new library to use (in B4J, it is now jB4XEncryption). Just saying...
You can. You just have to create your own. I'm pretty sure the methods in iEncryption/Encryption libraries are similar enough to create standard B4X code.
If you want other people to help you, either also include B4XEncryption when you post your problems, or let them know what new library to use (in B4J, it is now jB4XEncryption). Just saying...
You can. You just have to create your own. I'm pretty sure the methods in iEncryption/Encryption libraries are similar enough to create standard B4X code.
If you encrypt the same data and get the same result it's easier for a hacker. Remember the German Enigma device (WW2). All messages started with the weather report and the same phrases which caused it to be hacked by England.
Goal:
Same data to encrypt <> same encrypted data = more security
Solution:
Add salt (e.g. first 64 bytes) = random bytes = must be a multiple of 16 = noone knows where the final data starts
IV = AES is a block cypher = IV is some kind of a "sort order" = which block is encrypted first/between/last = 16 random bytes
Encrypted data:
16 bytes salt & 16 bytes IV & encrypted data
Decryption:
- remove first 16 bytes (salt)
- get next 16 bytes (IV) and set/use it (try to set it all to zeroes and you'll get a funny sort order)
- decrypt the remaining bytes
PS: Salt & IV are public, but as you use a salt with a multiple length of 16 noone knows where each data starts