From 2dc8dae6bd3232e6e7daa11a0267909af878b6b2 Mon Sep 17 00:00:00 2001 From: Emman Date: Tue, 26 Apr 2022 10:13:17 +0800 Subject: [PATCH] Update comments --- zuc/eia.go | 1 + zuc/eia256.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/zuc/eia.go b/zuc/eia.go index d0bd7b3..457d951 100644 --- a/zuc/eia.go +++ b/zuc/eia.go @@ -23,6 +23,7 @@ type ZUC128Mac struct { } // NewHash create hash for zuc-128 eia, with arguments key and iv. +// Both key/iv size are 16 in bytes. func NewHash(key, iv []byte) (*ZUC128Mac, error) { k := len(key) ivLen := len(iv) diff --git a/zuc/eia256.go b/zuc/eia256.go index bef0ae5..d989d47 100644 --- a/zuc/eia256.go +++ b/zuc/eia256.go @@ -16,7 +16,8 @@ type ZUC256Mac struct { len uint64 } -// NewHash create hash for zuc-128 eia, with arguments key, iv and tagSize. +// NewHash256 create hash for zuc-256 eia, with arguments key, iv and tagSize. +// Key size is 32 in bytes, iv size is 23 in bytes, tagSize supports 4/8/16 in bytes. // The larger the tag size, the worse the performance. func NewHash256(key, iv []byte, tagSize int) (*ZUC256Mac, error) { k := len(key)