Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: DaCryptoRaccoon on June 10, 2019, 09:47:03 AM



Title: Remove Of AES-128 Code
Post by: DaCryptoRaccoon on June 10, 2019, 09:47:03 AM
I have been keeping eyes on the taproot development over on git and noticed this edit to the code.

Remove unused AES-128 code
https://github.com/sipa/bitcoin/commit/edc68d40e9689f74f4cdfba010691e9811786086

I wanted to know more about this removal and why some parts have been left and some have been removed also the explanation of the remove leave much to the imagination.

after looking back at some of the earlier code base it seems this feature was used in development for derivation path?

http://btc.yt/lxr/satoshi/ident?v=0.3.23&_i=SetKeyFromPassphrase&%21v=0.5.2

Code:
CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<unsigned char>& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod)

Why remove this code?
What effect will remove have (i.e what will the remove of the code effect or stop the use of)

Thanks  ;)


Title: Re: Remove Of AES-128 Code
Post by: achow101 on June 10, 2019, 08:24:46 PM
What are you talking about? SetKeyFromPassphrase appears to be completely unrelated to this code.

AES-128 was removed because it is not being actively used. It's removal has no effect on Bitcoin Core, the wallet, or the security of the wallet. Removing it doesn't stop anything, it just cleans up the codebase so that there isn't some unused stuff.


Title: Re: Remove Of AES-128 Code
Post by: DaCryptoRaccoon on June 11, 2019, 09:14:40 AM
My mistake.

it was the reference to AES256 that I didn't read properly.

The AES-256 code is used in `CCrypter::Encrypt`/`CCrypter::Decrypt` (`src/wallet/cin crypter.cpp`). which is where I picked up the relation.

Thank for clearing that up.