Hot answers tagged

7

The standard answer to this question is format-preserving encryption (FPE). FPE is a class of techniques that allow you to encrypt data while preserving some of its format (which can include its length). In terms of security, most FPE schemes are deterministic, which means they do not achieve the standard IND-CPA notion of security. However, for ...


3

Any cryptosystem in which the size of the ciphertext equals that of the plaintext is necessarily deterministic, and thus can only be secure if each key is used to encrypt only one message.


2

Your fingerprint is for OpenPGP V4 compatible as it uses SHA-1. The fingerprint is 20 bytes instead of 16 for MD5 used in the older package format. For V4 it is required to extract the public key packet first. This is likely to be the most tricky part, as PGP uses it's own packet format. You'll have to parse the binary data within your base 64 encoded blob ...


2

As mentioned in the comments this is a standard problem not unique to SRP and not really about the cryptography of SRP. So this question would probably be better posted on 'security.stackexchange.com' as it is more of a generic problem. Fundamentally setting a shared secret like a regular password or a password verifier over a public network has its ...


2

There are many block-cipher modes. CBC for example works only on full blocks of plaintext and produces ciphertext as a multiple of the block size, it is therefore not applicable to your case. CTR transforms a block-cipher into a stream-cipher, which produces a ciphertext that has the same length as the plaintext. This mode requires the use of a nonce as ...


2

Which techniques can I use? You can use a system like the ones used for the encryption of credit card numbers: AES (for a good grade of encryption) + FPE (for preserve length). Have a look at “A Synopsis of Format-Preserving Encryption” by Phillip Rogaway (PDF)


1

Which techniques can I use? The most ideal option is to use synchronous-stream ciphers. They are not only fast, but also let you retain the plaintexts length. The best pseudorandom number generator I know is AES-CTR. How secure are these techniques as compared to the ones which increase the size of the data. It completely depends on the ...



Only top voted, non community-wiki answers of a minimum length are eligible