/* * Set new tweak */ void XTS_Decryption::set_iv(const InitializationVector& iv) { if(iv.length() != tweak.size()) throw Invalid_IV_Length(name(), iv.length()); tweak = iv.bits_of(); cipher2->encrypt(tweak); }
void Keyed_Filter::set_iv(const InitializationVector& iv) { if(iv.length() != 0) throw Invalid_IV_Length(name(), iv.length()); }
/* * Set the EAX nonce */ void EAX_Base::set_iv(const InitializationVector& iv) { nonce_mac = eax_prf(0, BLOCK_SIZE, cmac, iv.begin(), iv.length()); ctr->set_iv(&nonce_mac[0], nonce_mac.size()); }