Skip to content

Commit

Permalink
fix missing part
Browse files Browse the repository at this point in the history
  • Loading branch information
emmansun authored Apr 19, 2024
1 parent c82d587 commit 3837f40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sm2.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function adaptSM2 (ecdsa) {
throw new Error('sm2: invalid cipher content length')
}
const c1 = rs.ECPointFp.decodeFrom(this.ecparams.curve, Array.from(data.subarray(0, 65)))
const s = point1.multiply(d)
const s = c1.multiply(d)
const c2 = data.subarray(97)
const c3 = data.subarray(65, 97)
const plaintext = kdf(new Uint8Array(util.integerToBytes(s.getX().toBigInteger(), SM2_BYTE_SIZE).concat(util.integerToBytes(s.getY().toBigInteger(), SM2_BYTE_SIZE))), dataLen - 97)
Expand Down

0 comments on commit 3837f40

Please sign in to comment.