The following code in modes.h
(https://github.com/weidai11/cryptopp/blob/master/modes.h#L300) shows
that IV will become BLOCKSIZE.

CipherModeFinalTemplate_CipherHolder(const byte *key, size_t length,
const byte *iv)
{
    this->m_cipher = &this->m_object;
    this->SetKey(key, length, MakeParameters(Name::IV(),
ConstByteArrayParameter(iv, this->m_cipher->BlockSize())));
}

On Thu, Jul 5, 2018 at 11:35 PM, Jeffrey Walton <noloa...@gmail.com> wrote:
>
>
> On Friday, July 6, 2018 at 2:23:00 AM UTC-4, 许皓宇 wrote:
>>
>> I've used cryptopp in my project recently, i try to use AES-CTR model
>> encryption.
>>
>>  CryptoPP::CTR_Mode<CryptoPP::AES>::Encryption(const CryptoPP::byte* key,
>> size_t length, const CryptoPP::byte* iv)
>>
>> This constructor provide a length check of key but do not check length of
>> iv
>
>
> For that particular constructor the parameter iv must be BLOCKSIZE bytes.
>
> There are other constructors available that takes an ivLength, too.
>
> Looking at the manual it is not well documented. For example,
> https://www.cryptopp.com/docs/ref/class_cipher_mode_final_template___cipher_holder.html
> .
>
> Let me get some updates added.
>
> Jeff
>
> --
> You received this message because you are subscribed to "Crypto++ Users".
> More information about Crypto++ and this group is available at
> http://www.cryptopp.com and
> http://groups.google.com/forum/#!forum/cryptopp-users.
> ---
> You received this message because you are subscribed to the Google Groups
> "Crypto++ Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cryptopp-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 

Weikeng Chen @ 795 Soda Hall

-- 
You received this message because you are subscribed to "Crypto++ Users". More 
information about Crypto++ and this group is available at 
http://www.cryptopp.com and 
http://groups.google.com/forum/#!forum/cryptopp-users.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to