You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In MRI Ruby, a block of ciphertext is returned as soon as an entire block of data (KEY_LENGTH bytes) has been provided to the cipher. In JRuby, that block of ciphertext is not returned until one additional byte is added to the cipher (for a total of KEY_LENGTH + 1 bytes) via cipher.update.
This produces undesired results in situations where the cipher.final method should be optional because the last block (with PKCS#7 padding) is not desired. For example: SmallLars/openssl-cmac#3
The text was updated successfully, but these errors were encountered:
cipher.update and cipher.final have different behavior in JRuby vs MRI for block ciphers when data is added in KEY_LENGTH sized chunks.
In MRI Ruby, a block of ciphertext is returned as soon as an entire block of data (KEY_LENGTH bytes) has been provided to the cipher. In JRuby, that block of ciphertext is not returned until one additional byte is added to the cipher (for a total of KEY_LENGTH + 1 bytes) via cipher.update.
This produces undesired results in situations where the cipher.final method should be optional because the last block (with PKCS#7 padding) is not desired. For example: SmallLars/openssl-cmac#3
The text was updated successfully, but these errors were encountered: