Update
Hashlib's API is getting a bit of a facelift. No massive functional changes, just an API that is a bit more clear and concise and has less fluff (and less exposed functions).
The new API have a class-esque appearance with subclasses delimited by underscores, like so:
class_algorithm_method();
Code:
It's my hope that the new nomenclature of the functions improves usability as well as the portability of adding new functions to the library.
AES ECB block encryptors and padding functions are no longer exposed given that the exposed cipher methods automatically apply and strip padding, ECB mode is insecure and lacks the side channel resistance measures placed in the exposed methods.
Hashlib's API is getting a bit of a facelift. No massive functional changes, just an API that is a bit more clear and concise and has less fluff (and less exposed functions).
The new API have a class-esque appearance with subclasses delimited by underscores, like so:
class_algorithm_method();
Code:
// Secure RNG functions
csrand_init()
csrand_get()
csrand_fill();
// Hash functions
hash_init();
hash_update();
hash_final();
hash_mgf1();
// HMAC functions
hmac_init();
hmac_update();
hmac_final();
hmac_reset();
// Cipher functions
aes_loadkey();
aes_encrypt();
aes_decrypt();
rsa_encrypt();
// Digest functions
digest_tostring();
digest_compare();
It's my hope that the new nomenclature of the functions improves usability as well as the portability of adding new functions to the library.
AES ECB block encryptors and padding functions are no longer exposed given that the exposed cipher methods automatically apply and strip padding, ECB mode is insecure and lacks the side channel resistance measures placed in the exposed methods.