Just to be picky...in crypto terms "plaintext" defines the raw unencrypted data and has nothing to do with it being "text". The output of an encryption process might base64 encode the result if there's any chance the data might be accidentally modified but that's got nothing to do with the encryption per se. All modern algorithms work with binary data in bits or blocks of bits. Encrypted data is longer than the plaintext for block algorithms because they always work with a set number of bits - the block size - and pad out shorter data. Stream ciphers like RC4 (and AES in streaming mode) will produce a cipher text of the same size as the plaintext but of course it's binary data, and anyway, streaming ciphers are not suitable for database columns. Another reason that the encrypted output is longer than the input data is that there's often more information that needs to be stored with the encrypted result - some random data (a salt or an iv) and perhaps a key identifier.


On 5/2/2012 11:10 PM, CRPence wrote:
But that would introduce a new problem,
because most encryption is designed to encrypt/plaintext/ data, so the
binary data would first need to be passed through a base64 encoding to
enable proper encryption.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].