aead using sec over af_alg

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

aead using sec over af_alg

544件の閲覧回数
td71522
Contributor I

Hi,

im working on the lx2160a with the sec engine. I can use the accelerators for hashing and ciphers successfully but I am struggling with use it for AEAD. I'm using the af_alg socket to communicate with the linux crypto api. At the marked position i get the error invalid Argument. I have no idead what to change, since i followed the documentation fof the kernel for the crypto api user interface.

Thanks in advance

TD

td71522_0-1669986938772.png

 

0 件の賞賛
返信
3 返答(返信)

505件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Sorry for the delay. here is the update:
#####
Can you check if you are setting up the sockaddr_alg structure correctly?

Following is one example.
struct sockaddr_alg sa = {
    .salg_family = AF_ALG,
    .salg_type = "aead", /* this selects the symmetric cipher */
    .salg_name = "gcm(aes)" /* this is the cipher name */
};

The thing is that this is a standard Linux interface. We (NXP) can only control the ciphers registered by the SEC driver.
Also, it would be good know which specific algorithm are you trying to use.
#####

0 件の賞賛
返信

479件の閲覧回数
td71522
Contributor I
Thanks for the reply, i had an mistake in configuring the sec. I was able to fix the mistake and everything is working fine now.
0 件の賞賛
返信

543件の閲覧回数
td71522
Contributor I
the length in cmsg->cmsg_len = CMSG_LEN(CMSG_SPACE());
is meant to be cmsg->cmsg_len = CMSG_LEN(CMSG_SPACE(sizeof(initVector)));
idk why its missing
0 件の賞賛
返信