Skip to content
Permalink
Browse files

sys/linux/init_alg.go: update algorithms

- Add arm64 implementations of various algorithms
  (these are usually named -arm64, -neon, or -ce)
- Add missing x86 SHA-NI algorithms (sha*-ni)
- Add adiantum    (new in v4.20)
- Add streebog256 (new in v4.20)
- Add streebog512 (new in v4.20)
- Add vmac64      (new in v4.19)
- Add xchacha12   (new in v4.20)
- Add xchacha20   (new in v4.20)
- Remove speck128 (was removed soon after being added to kernel)
- Remove speck64  (likewise)
- Move sm4 from hash list to cipher list
  • Loading branch information...
ebiggers authored and dvyukov committed Jan 1, 2019
1 parent b866678 commit f064b4365d3e4f92f554ef0209b8749b56c4f532
Showing with 64 additions and 6 deletions.
  1. +64 −6 sys/linux/init_alg.go
@@ -149,7 +149,9 @@ var allAlgs = map[int][]algDesc{
{"aegis256", nil},
{"aegis256-aesni", nil},
{"aegis256-generic", nil},
{"ccm-aes-ce", nil},
{"gcm(aes)", nil},
{"gcm-aes-ce", nil},
{"gcm_base(ctr(aes-aesni),ghash-generic)", nil},
{"generic-gcm-aesni", nil},
{"morus1280", nil},
@@ -164,6 +166,8 @@ var allAlgs = map[int][]algDesc{
},
ALG_BLKCIPHER: {
// templates:
{"adiantum", []int{ALG_BLKCIPHER, ALG_CIPHER, ALG_HASH}},
{"adiantum", []int{ALG_BLKCIPHER, ALG_CIPHER}},
{"cbc", []int{ALG_CIPHER}},
{"cfb", []int{ALG_CIPHER}},
{"cryptd", []int{ALG_BLKCIPHER}},
@@ -191,6 +195,8 @@ var allAlgs = map[int][]algDesc{
{"cbc(serpent)", nil},
{"cbc(twofish)", nil},
{"cbc-aes-aesni", nil},
{"cbc-aes-ce", nil},
{"cbc-aes-neon", nil},
{"cbc-blowfish-asm", nil},
{"cbc-camellia-aesni", nil},
{"cbc-camellia-aesni-avx2", nil},
@@ -205,6 +211,7 @@ var allAlgs = map[int][]algDesc{
{"cbc-twofish-avx", nil},
{"chacha20", nil},
{"chacha20-generic", nil},
{"chacha20-neon", nil},
{"chacha20-simd", nil},
{"ctr(aes)", nil},
{"ctr(aes-aesni)", nil},
@@ -216,6 +223,9 @@ var allAlgs = map[int][]algDesc{
{"ctr(serpent)", nil},
{"ctr(twofish)", nil},
{"ctr-aes-aesni", nil},
{"ctr-aes-ce", nil},
{"ctr-aes-neon", nil},
{"ctr-aes-neonbs", nil},
{"ctr-blowfish-asm", nil},
{"ctr-camellia-aesni", nil},
{"ctr-camellia-aesni-avx2", nil},
@@ -240,6 +250,8 @@ var allAlgs = map[int][]algDesc{
{"ecb(serpent)", nil},
{"ecb(twofish)", nil},
{"ecb-aes-aesni", nil},
{"ecb-aes-ce", nil},
{"ecb-aes-neon", nil},
{"ecb-blowfish-asm", nil},
{"ecb-camellia-aesni", nil},
{"ecb-camellia-aesni-avx2", nil},
@@ -274,12 +286,22 @@ var allAlgs = map[int][]algDesc{
{"salsa20", nil},
{"salsa20-asm", nil},
{"salsa20-generic", nil},
{"xchacha12", nil},
{"xchacha12-generic", nil},
{"xchacha12-neon", nil},
{"xchacha12-simd", nil},
{"xchacha20", nil},
{"xchacha20-generic", nil},
{"xchacha20-neon", nil},
{"xchacha20-simd", nil},
{"xts(aes)", nil},
{"xts(camellia)", nil},
{"xts(cast6)", nil},
{"xts(serpent)", nil},
{"xts(twofish)", nil},
{"xts-aes-aesni", nil},
{"xts-aes-ce", nil},
{"xts-aes-neon", nil},
{"xts-camellia-aesni", nil},
{"xts-camellia-aesni-avx2", nil},
{"xts-camellia-asm", nil},
@@ -293,7 +315,9 @@ var allAlgs = map[int][]algDesc{
ALG_CIPHER: {
{"aes", nil},
{"aes-aesni", nil},
{"aes-arm64", nil},
{"aes-asm", nil},
{"aes-ce", nil},
{"aes-fixed-time", nil},
{"aes-generic", nil},
{"anubis", nil},
@@ -325,6 +349,9 @@ var allAlgs = map[int][]algDesc{
{"seed-generic", nil},
{"serpent", nil},
{"serpent-generic", nil},
{"sm4", nil},
{"sm4-ce", nil},
{"sm4-generic", nil},
{"tea", nil},
{"tea-generic", nil},
{"tnepres", nil},
@@ -345,21 +372,28 @@ var allAlgs = map[int][]algDesc{
{"hmac", []int{ALG_HASH}},
{"mcryptd", []int{ALG_HASH}},
{"vmac", []int{ALG_CIPHER}},
{"vmac64", []int{ALG_CIPHER}},
{"xcbc", []int{ALG_CIPHER}},

// algorithms:
{"cbcmac-aes-ce", nil},
{"cbcmac-aes-neon", nil},
{"cmac-aes-ce", nil},
{"cmac-aes-neon", nil},
{"crc32", nil},
{"crc32-generic", nil},
{"crc32-pclmul", nil},
{"crc32c", nil},
{"crc32c-generic", nil},
{"crc32c-intel", nil},
{"crct10dif", nil},
{"crct10dif-arm64-ce", nil},
{"crct10dif-generic", nil},
{"crct10dif-pclmul", nil},
{"digest_null", nil},
{"digest_null-generic", nil},
{"ghash", nil},
{"ghash-ce", nil},
{"ghash-clmulni", nil},
{"ghash-generic", nil},
{"md4", nil},
@@ -368,6 +402,11 @@ var allAlgs = map[int][]algDesc{
{"md5-generic", nil},
{"michael_mic", nil},
{"michael_mic-generic", nil},
{"nhpoly1305", nil},
{"nhpoly1305-avx2", nil},
{"nhpoly1305-generic", nil},
{"nhpoly1305-neon", nil},
{"nhpoly1305-sse2", nil},
{"poly1305", nil},
{"poly1305-generic", nil},
{"poly1305-simd", nil},
@@ -382,47 +421,64 @@ var allAlgs = map[int][]algDesc{
{"sha1", nil},
{"sha1-avx", nil},
{"sha1-avx2", nil},
{"sha1-ce", nil},
{"sha1-generic", nil},
{"sha1-ni", nil},
{"sha1-ssse3", nil},
{"sha1_mb", nil},
{"sha224", nil},
{"sha224-arm64", nil},
{"sha224-arm64-neon", nil},
{"sha224-avx", nil},
{"sha224-avx2", nil},
{"sha224-ce", nil},
{"sha224-generic", nil},
{"sha224-ni", nil},
{"sha224-ssse3", nil},
{"sha256", nil},
{"sha256-arm64", nil},
{"sha256-arm64-neon", nil},
{"sha256-avx", nil},
{"sha256-avx2", nil},
{"sha256-ce", nil},
{"sha256-generic", nil},
{"sha256-ni", nil},
{"sha256-ssse3", nil},
{"sha256_mb", nil},
{"sha3-224", nil},
{"sha3-224-ce", nil},
{"sha3-224-generic", nil},
{"sha3-256", nil},
{"sha3-256-ce", nil},
{"sha3-256-generic", nil},
{"sha3-384", nil},
{"sha3-384-ce", nil},
{"sha3-384-generic", nil},
{"sha3-512", nil},
{"sha3-512-ce", nil},
{"sha3-512-generic", nil},
{"sha384", nil},
{"sha384-arm64", nil},
{"sha384-avx", nil},
{"sha384-avx2", nil},
{"sha384-ce", nil},
{"sha384-generic", nil},
{"sha384-ssse3", nil},
{"sha512", nil},
{"sha512-arm64", nil},
{"sha512-avx", nil},
{"sha512-avx2", nil},
{"sha512-ce", nil},
{"sha512-generic", nil},
{"sha512-ssse3", nil},
{"sha512_mb", nil},
{"sm3", nil},
{"sm3-ce", nil},
{"sm3-generic", nil},
{"sm4", nil},
{"sm4-generic", nil},
{"speck128", nil},
{"speck128-generic", nil},
{"speck64", nil},
{"speck64-generic", nil},
{"streebog256", nil},
{"streebog256-generic", nil},
{"streebog512", nil},
{"streebog512-generic", nil},
{"tgr128", nil},
{"tgr128-generic", nil},
{"tgr160", nil},
@@ -435,6 +491,8 @@ var allAlgs = map[int][]algDesc{
{"wp384-generic", nil},
{"wp512", nil},
{"wp512-generic", nil},
{"xcbc-aes-ce", nil},
{"xcbc-aes-neon", nil},
},
ALG_RNG: {
{"ansi_cprng", nil},

0 comments on commit f064b43

Please sign in to comment.
You can’t perform that action at this time.