Commit graph

8 commits

Author SHA1 Message Date
Wladimir J. van der Laan 999e4c91c2 wallet: Change CCrypter to use vectors with secure allocator
Change CCrypter to use vectors with secure allocator instead of buffers
on in the object itself which will end up on the stack. This avoids
having to call LockedPageManager to lock stack memory pages to prevent the
memory from being swapped to disk. This is wasteful.
2016-10-19 16:17:33 +02:00
Cory Fields 34ed64a404 crypter: add tests for crypter
Verify that results correct (match known values), consistent (encrypt->decrypt
matches the original), and compatible with the previous openssl implementation.

Also check that failed encrypts/decrypts fail the exact same way as openssl.
2016-05-13 10:23:04 +02:00
Cory Fields 976f9ec264 crypter: add a BytesToKey clone to replace the use of openssl
BytesToKeySHA512AES should be functionally identical to EVP_BytesToKey, but
drops the dependency on openssl.
2016-05-13 10:23:04 +02:00
Cory Fields fb96831c1f crypter: constify encrypt/decrypt
This makes CCrypter easier to pass aroundf for tests
2016-05-13 10:23:04 +02:00
Cory Fields 1c391a5866 crypter: fix the stored initialization vector size
AES IV's are 16bytes, not 32. This was harmless but confusing.

Add WALLET_CRYPTO_IV_SIZE to make its usage explicit.
2016-05-13 10:23:03 +02:00
MarcoFalke fa24439ff3 Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
Philip Kaufmann a21df62069 ensure consistent header comment naming conventions
- BITCOIN_FOLDER_SUBFOLDER_FILENAME_H
2015-04-20 13:29:22 +02:00
Cory Fields a354a59f1f wallet: move crypter to wallet 2015-03-22 15:18:55 -04:00
Renamed from src/crypter.h (Browse further)