Commit Graph

5 Commits

Author SHA1 Message Date
makejian
10168903cc crypto/bn: add method to calculate inv mod and gcd
Signed-off-by: makejian <makejian@xiaomi.com>
2024-08-24 11:20:17 +08:00
makejian
21514e266a crypto/bn: bignum supports negative number operations
1.Add sign to indicate negative and positive
2.Fix case where there are negative numbers in the operation
3.expand to 512 bytes to support rsa2048

Signed-off-by: makejian <makejian@xiaomi.com>
2024-08-24 11:20:17 +08:00
yinshengkai
20ebe0e64c Replace all asserts in kernel code with ASSERT
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-05-17 10:18:16 -03:00
makejian
aeac109e50 crypto/bn:Add exponentiation algorithm in bignum
add exponentiation algorithm: pow_mod_faster
Signed-off-by: makejian <makejian@xiaomi.com>
2023-10-18 12:23:13 +08:00
makejian
12935f2d33 crypto/bn: porting tiny-Bignum-C into nuttx crypto
porting from https://github.com/kokke/tiny-bignum-c commit ac136565378c624365e0f5f556d386b3966bff32 and adapting to the nuttx
Signed-off-by: makejian <makejian@xiaomi.com>
2023-10-18 12:23:13 +08:00