mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 12:16:20 +08:00
kdf: share Z hash state #220
This commit is contained in:
parent
c99ad27ce1
commit
4fe8d28d31
@ -9,7 +9,6 @@ import (
|
||||
"io"
|
||||
"sync"
|
||||
|
||||
"github.com/emmansun/gmsm/kdf"
|
||||
"github.com/emmansun/gmsm/sm3"
|
||||
)
|
||||
|
||||
@ -129,7 +128,7 @@ func (uv *PublicKey) SM2SharedKey(isResponder bool, kenLen int, sPub, sRemote *P
|
||||
copy(buffer[96:], peerZ)
|
||||
}
|
||||
|
||||
return kdf.Kdf(sm3.New(), buffer[:], kenLen), nil
|
||||
return sm3.Kdf(buffer[:], kenLen), nil
|
||||
}
|
||||
|
||||
// PrivateKey is an ECDH private key, usually kept secret.
|
||||
|
Loading…
x
Reference in New Issue
Block a user