All of lore.kernel.org
 help / color / mirror / Atom feed
* ARM-CE aes encryption on uneven blocks
@ 2016-10-24 14:41 Cata Vasile
  2016-10-26  7:16 ` Hamid Nassiby
  0 siblings, 1 reply; 3+ messages in thread
From: Cata Vasile @ 2016-10-24 14:41 UTC (permalink / raw)
  To: linux-crypto


Hi,

I'm trying to understand the code for AES encryption from ARM-CE.
>From the aes-glue.S calls I understand that the encryption primitives receive the number of blocks, but have no way of determining the number of bytes to encrypt, if for example the plaintext does not have a length of a multiple of AES block size.
How does, for example, ecb_encrypt() also encrypt the last remaining bytes in the plaintext if it is not a multiple of AES block size if It can never deduce the full plaintext size?

Catalin Vasile

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ARM-CE aes encryption on uneven blocks
  2016-10-24 14:41 ARM-CE aes encryption on uneven blocks Cata Vasile
@ 2016-10-26  7:16 ` Hamid Nassiby
  2016-10-26  7:49   ` Cata Vasile
  0 siblings, 1 reply; 3+ messages in thread
From: Hamid Nassiby @ 2016-10-26  7:16 UTC (permalink / raw)
  To: Cata Vasile; +Cc: linux-crypto

Hi,

Based on my old experience with "struct crypto_alg" based drivers, the
data you receive there, is padded beforehand(in the upper layers);
Therefore the plaintext contains integral multiple of AES block size
of data and based on the number of blocks, the crypto transform can be
computed.

Regards,
Hamid

On Mon, Oct 24, 2016 at 6:11 PM, Cata Vasile <cata.vasile@nxp.com> wrote:
>
> Hi,
>
> I'm trying to understand the code for AES encryption from ARM-CE.
> From the aes-glue.S calls I understand that the encryption primitives receive the number of blocks, but have no way of determining the number of bytes to encrypt, if for example the plaintext does not have a length of a multiple of AES block size.
> How does, for example, ecb_encrypt() also encrypt the last remaining bytes in the plaintext if it is not a multiple of AES block size if It can never deduce the full plaintext size?
>
> Catalin Vasile--
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ARM-CE aes encryption on uneven blocks
  2016-10-26  7:16 ` Hamid Nassiby
@ 2016-10-26  7:49   ` Cata Vasile
  0 siblings, 0 replies; 3+ messages in thread
From: Cata Vasile @ 2016-10-26  7:49 UTC (permalink / raw)
  To: Hamid Nassiby; +Cc: linux-crypto

Then what is the role of the "for" structure? Why not do just a single encryption/decryption call?

Regards,
Cata

>From: Hamid Nassiby <h.nassiby@gmail.com>
>Sent: Wednesday, October 26, 2016 10:16 AM
>To: Cata Vasile
>Cc: linux-crypto@vger.kernel.org
>Subject: Re: ARM-CE aes encryption on uneven blocks
>    
>Hi,>

>Based on my old experience with "struct crypto_alg" based drivers, the
>data you receive there, is padded beforehand(in the upper layers);
>Therefore the plaintext contains integral multiple of AES block size
>of data and based on the number of blocks, the crypto transform can be
>computed.>

>Regards,
>Hamid>

>On Mon, Oct 24, 2016 at 6:11 PM, Cata Vasile <cata.vasile@nxp.com> wrote:
>>
>> Hi,
>>
>> I'm trying to understand the code for AES encryption from ARM-CE.
>> From the aes-glue.S calls I understand that the encryption primitives receive the number of blocks, but have no way of determining the number of bytes to encrypt, if for example the plaintext does not have a length of a multiple of AES block size.
>> How does, for example, ecb_encrypt() also encrypt the last remaining bytes in the plaintext if it is not a multiple of AES block size if It can never deduce the full plaintext size?
>>
>> Catalin Vasile--
>> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at   https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvger.kernel.org%2Fmajordomo-info.html&data=01%7C01%7Ccata.vasile%40nxp.com%7C4c5ecc69183f40e96faf08d3fd701bab%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=vVYloLYwzQl3keXvz%2FMdV3d2ruHmn26F%2FfY%2FA7GG8wA%3D&reserved=0
>    

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-26 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-24 14:41 ARM-CE aes encryption on uneven blocks Cata Vasile
2016-10-26  7:16 ` Hamid Nassiby
2016-10-26  7:49   ` Cata Vasile

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.