MCPcopy Index your code
hub / github.com/SeanDragon/protools / ZA

Method ZA

security/src/main/java/pro/tools/security/sm/SM2.java:142–150  ·  view source on GitHub ↗

取得用户标识字节数组 @param IDA @param aPublicKey @return

(String IDA, ECPoint aPublicKey)

Source from the content-addressed store, hash-verified

140 * @return
141 */
142 private static byte[] ZA(String IDA, ECPoint aPublicKey) {
143 byte[] idaBytes = IDA.getBytes();
144 int entlenA = idaBytes.length * 8;
145 byte[] ENTLA = new byte[]{(byte) (entlenA & 0xFF00), (byte) (entlenA & 0x00FF)};
146 byte[] ZA = sm3hash(ENTLA, idaBytes, a.toByteArray(), b.toByteArray(), gx.toByteArray(), gy.toByteArray(),
147 aPublicKey.getXCoord().toBigInteger().toByteArray(),
148 aPublicKey.getYCoord().toBigInteger().toByteArray());
149 return ZA;
150 }
151
152 /**
153 * 密钥派生函数

Callers 3

signMethod · 0.95
verifyMethod · 0.95
KeyExchangeMethod · 0.80

Calls 2

sm3hashMethod · 0.95
toByteArrayMethod · 0.80

Tested by

no test coverage detected