From 30c985bd9db11e64cc7007fa5523ec6e77fd3d1f Mon Sep 17 00:00:00 2001 From: Nithinsen Kaithakadan Date: Mon, 2 Mar 2026 10:50:15 +0530 Subject: [PATCH 1/2] api: crypto: add ZUC-256 NEA6 and NIA6 algorithms Add 3GPP defined ZUC based confidentiality and integrity algorithms with 256 bit key. Signed-off-by: Nithinsen Kaithakadan --- include/odp/api/spec/crypto_types.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/odp/api/spec/crypto_types.h b/include/odp/api/spec/crypto_types.h index 365857e214e..9b0cf7f0a86 100644 --- a/include/odp/api/spec/crypto_types.h +++ b/include/odp/api/spec/crypto_types.h @@ -172,6 +172,14 @@ typedef enum { */ ODP_CIPHER_ALG_ZUC_EEA3, + /** NEA6 confidentiality algorithm + * + * 256-NEA6 algorithm. + * + * Key length is 256 bits. IV size is 16 bytes. + */ + ODP_CIPHER_ALG_ZUC_NEA6, + /** SNOW-V stream cipher */ ODP_CIPHER_ALG_SNOW_V, @@ -387,6 +395,14 @@ typedef enum { */ ODP_AUTH_ALG_ZUC_EIA3, + /** NIA6 integrity algorithm + * + * 256-NIA6 algorithm. + * + * Key length is 256 bits. IV size is 16 bytes. + */ + ODP_AUTH_ALG_ZUC_NIA6, + /** SNOW-V-GCM AEAD algorithm * * SNOW-V-GCM provides both authentication and encryption. This auth @@ -536,6 +552,9 @@ typedef union odp_crypto_cipher_algos_t { /** ODP_CIPHER_ALG_ZUC_EEA3 */ uint32_t zuc_eea3 : 1; + /** ODP_CIPHER_ALG_ZUC_NEA6 */ + uint32_t zuc_nea6 : 1; + /** ODP_CIPHER_ALG_SNOW_V */ uint32_t snow_v : 1; @@ -638,6 +657,9 @@ typedef union odp_crypto_auth_algos_t { /** ODP_AUTH_ALG_ZUC_EIA3 */ uint32_t zuc_eia3 : 1; + /** ODP_AUTH_ALG_ZUC_NIA6 */ + uint32_t zuc_nia6 : 1; + /** ODP_AUTH_ALG_SNOW_V_GCM */ uint32_t snow_v_gcm : 1; From 20c071933942d8e3a95896db37957e78f0498560 Mon Sep 17 00:00:00 2001 From: Nithinsen Kaithakadan Date: Mon, 27 Apr 2026 16:30:25 +0000 Subject: [PATCH 2/2] example: sysinfo: print zuc256 crypto capabilities Print ZUC 256 based crypto algorithm capabilities. Signed-off-by: Nithinsen Kaithakadan --- example/sysinfo/odp_sysinfo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/example/sysinfo/odp_sysinfo.c b/example/sysinfo/odp_sysinfo.c index 260b564f46c..b693e44e61a 100644 --- a/example/sysinfo/odp_sysinfo.c +++ b/example/sysinfo/odp_sysinfo.c @@ -197,6 +197,8 @@ static const char *cipher_alg_name(odp_cipher_alg_t cipher) return "aes_eea2"; case ODP_CIPHER_ALG_ZUC_EEA3: return "zuc_eea3"; + case ODP_CIPHER_ALG_ZUC_NEA6: + return "zuc_nea6"; case ODP_CIPHER_ALG_SNOW_V: return "snow_v"; case ODP_CIPHER_ALG_SNOW_V_GCM: @@ -263,6 +265,8 @@ static const char *auth_alg_name(odp_auth_alg_t auth) return "aes_eia2"; case ODP_AUTH_ALG_ZUC_EIA3: return "zuc_eia3"; + case ODP_AUTH_ALG_ZUC_NIA6: + return "zuc_nia6"; case ODP_AUTH_ALG_SNOW_V_GCM: return "snow_v_gcm"; case ODP_AUTH_ALG_SNOW_V_GMAC: @@ -341,6 +345,8 @@ static void foreach_cipher(odp_crypto_cipher_algos_t ciphers, cipher_op_t op) op(ODP_CIPHER_ALG_AES_EEA2); if (ciphers.bit.zuc_eea3) op(ODP_CIPHER_ALG_ZUC_EEA3); + if (ciphers.bit.zuc_nea6) + op(ODP_CIPHER_ALG_ZUC_NEA6); if (ciphers.bit.snow_v) op(ODP_CIPHER_ALG_SNOW_V); if (ciphers.bit.snow_v_gcm) @@ -403,6 +409,8 @@ static void foreach_auth(odp_crypto_auth_algos_t auths, auth_op_t op) op(ODP_AUTH_ALG_AES_EIA2); if (auths.bit.zuc_eia3) op(ODP_AUTH_ALG_ZUC_EIA3); + if (auths.bit.zuc_nia6) + op(ODP_AUTH_ALG_ZUC_NIA6); if (auths.bit.snow_v_gcm) op(ODP_AUTH_ALG_SNOW_V_GCM); if (auths.bit.snow_v_gmac)