mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 12:16:20 +08:00
kdf-sm3: fix arm64 bug
This commit is contained in:
parent
145eba63cb
commit
dc23026764
@ -30,8 +30,7 @@ func copyResult(result []byte, dig *[8]uint32) {
|
||||
|
||||
// state || words
|
||||
// 1216 = 68 * 4 * 4 + 8 * 4 * 4 = 76 * 16
|
||||
// 8 * 16 = 128
|
||||
const preallocSize = 1344
|
||||
const preallocSize = 1216
|
||||
|
||||
func kdfBy4(baseMD *digest, keyLen int, limit int) []byte {
|
||||
if limit < 4 {
|
||||
|
@ -190,7 +190,6 @@ TEXT ·blockMultBy4(SB), NOSPLIT, $0
|
||||
MOVD statePtr, wordStart
|
||||
VST1.P [a.S4, b.S4, c.S4, d.S4], 64(wordStart)
|
||||
VST1.P [e.S4, f.S4, g.S4, h.S4], 64(wordStart)
|
||||
MOVD wordStart, wordPtr
|
||||
|
||||
MOVD.P 8(srcPtrPtr), srcPtr1
|
||||
MOVD.P 8(srcPtrPtr), srcPtr2
|
||||
@ -198,6 +197,7 @@ TEXT ·blockMultBy4(SB), NOSPLIT, $0
|
||||
MOVD (srcPtrPtr), srcPtr4
|
||||
|
||||
loop:
|
||||
MOVD wordStart, wordPtr
|
||||
// load message block
|
||||
prepare4Words
|
||||
prepare4Words
|
||||
|
Loading…
x
Reference in New Issue
Block a user