incubator-nuttx/crypto
anjiahao 43d2c595b1 crypto:support crypto can handle streaming data
in user space
Use the flag (COP_FLAG_UPDATE)structure member to mark
whether it is just input data.
like this:
can do manys times,just input data
....

  cryp.ses = session.ses;
  cryp.op = COP_ENCRYPT;
  cryp.src = (caddr_t) s;
  cryp.len = len;
  cryp.flags = COP_FLAG_UPDATE;
  cryp.dst = 0;
  cryp.mac = (caddr_t) out;
  cryp.iv = 0;
  if (ioctl(cryptodev_fd, CIOCCRYPT, &cryp) == -1)
    {
      warn("CIOCCRYPT");
      goto err;
    }

can do manys times like frist...

then,the last time

Don't use any flay structure member to mark
this is last time,need get final result
....
  cryp.ses = session.ses;
  cryp.op = COP_ENCRYPT;
  cryp.src = (caddr_t) s;
  cryp.len = len;
  cryp.flags = 0;
  cryp.dst = 0;
  cryp.mac = (caddr_t) out;
  cryp.iv = 0;
  if (ioctl(cryptodev_fd, CIOCCRYPT, &cryp) == -1)
    {
      warn("CIOCCRYPT");
      goto err;
    }
....
that will get last result.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-17 01:19:38 +08:00
..
Kconfig crypto:add some hardware support 2022-12-14 02:33:56 +08:00
Makefile crypto:add some hardware support 2022-12-14 02:33:56 +08:00
aes.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
blake2s.c crypto: Haltian Ltd: update licenses to Apache 2021-11-15 06:49:32 -06:00
blf.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
cast.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
castsb.h crypto:convert code style form openbsd to nuttx 2022-12-14 02:33:56 +08:00
chacha_private.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
chachapoly.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
cmac.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
crypto.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
cryptodev.c crypto:support crypto can handle streaming data 2023-01-17 01:19:38 +08:00
cryptosoft.c crypto:support crypto can handle streaming data 2023-01-17 01:19:38 +08:00
des_locl.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
ecb3_enc.c crypto:convert code style form openbsd to nuttx 2022-12-14 02:33:56 +08:00
ecb_enc.c crypto:convert code style form openbsd to nuttx 2022-12-14 02:33:56 +08:00
gmac.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
hmac.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
hmac_buff.c crypto:add some hardware support 2022-12-14 02:33:56 +08:00
idgen.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
key_wrap.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
md5.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
podd.h crypto:convert code style form openbsd to nuttx 2022-12-14 02:33:56 +08:00
poly1305.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
random_pool.c Fix the coding style and typo issue 2022-11-14 09:34:04 +09:00
rijndael.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
rmd160.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
set_key.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
sha1.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
sha2.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
siphash.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
sk.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
spr.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
testmngr.c
testmngr.h
xform.c crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00