mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
fix: gen inputs for ecdsa with sha256 and sha512
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -47,6 +47,7 @@ export function generateCircuitInputsRegister(
|
||||
'sha1WithRSAEncryption',
|
||||
'sha256WithRSASSAPSS',
|
||||
'ecdsa-with-SHA1',
|
||||
'ecdsa-with-SHA256',
|
||||
].includes(signatureAlgorithm)
|
||||
) {
|
||||
console.error(`${signatureAlgorithm} has not been implemented.`);
|
||||
@@ -101,7 +102,12 @@ export function generateCircuitInputsRegister(
|
||||
let dsc_modulus: any;
|
||||
let signature: any;
|
||||
|
||||
if (signatureAlgorithm === 'ecdsa-with-SHA1') {
|
||||
if (
|
||||
signatureAlgorithm === 'ecdsa-with-SHA1' ||
|
||||
signatureAlgorithm === 'ecdsa-with-SHA256' ||
|
||||
signatureAlgorithm === 'ecdsa-with-SHA512' ||
|
||||
signatureAlgorithm === 'ecdsa-with-SHA384'
|
||||
) {
|
||||
const curve_params = pubKey.publicKeyQ.replace(/[()]/g, '').split(',');
|
||||
dsc_modulus = [curve_params[0], curve_params[1]]; // ! TODO REFACTOR SPLIT HERE WHAT IF WORKS
|
||||
signature = passportData.encryptedDigest;
|
||||
|
||||
Reference in New Issue
Block a user