Skip to content

Encryption

undergroundwires edited this page Feb 4, 2020 · 10 revisions

Encryption

There are AES and Blowfish implementations to provide stronger and faster security. They are are pretty easy-to use and are implemented in a secure way. They can be used synchronously and asynchronously.

AES the ISafeEncryptor

ISafeEncryptor abstracts an encryption operation which is designed to be slower to be more secure. Use it when you choose more security over performance (for most sensitive data).

AesEncryptor is the implementation of ISafeEncryptor. It uses =>

  • 256 bit key
  • Random IV for each encryption
  • Secures the key with with 100 iterations of Pbkdf2 key derivation function.
  • Uses PKCS7 padder.

Blowfish the IFastEncryptor

IFastEncryptor abstracts a secure and faster encryption algorithm.

Use it when the performance is also important as security. It's implementation,Blowfish, passes vector tests and can use different cipher modes.

The default CBC mode uses a random IV while ECB (not recommended) has no IV protection.

The encryption can be used with none or PKCS7 padding.

Asynchronous encryption

Encryption algorithms implement ICryptoTransform and write a sequence of bytes to the memory stream asynchronously in the cryptostream.

Clone this wiki locally