Crop private key to 16 bytes in V0 encryption-decryption
migesok opened this issue · 0 comments
migesok commented
Our current V0 cipher algorithm if a private key is larger than 16 bytes, throws an exception. At the same time it seems that in all places of usage we just crop the private key to 16 (for instance, in DecryptConfig
, and all the internal code which call decryptAES
directly which I found).
At the same time com.evolutiongaming.crypto.Decrypt
and com.evolutiongaming.crypto.Encrypt
apps in the library doesn't do that which creates confusion.
I propose to move cropping to 16 bytes inside the V0 cipher implementation and remove the related exception (AesKeyTooLong
).