pass tests

This commit is contained in:
motemotech
2024-12-28 01:07:12 +09:00
parent af73e359f2
commit ea6c8d4683
9 changed files with 23 additions and 22 deletions

View File

@@ -121,12 +121,12 @@ export const circuitToSelectorMode = {
export const MAX_DATAHASHES_LEN = 320; // max formatted and concatenated datagroup hashes length in bytes
export const n_dsc = 64;
export const n_dsc_3072 = 96;
export const n_dsc_4096 = 64;
export const n_dsc_4096 = 120;
export const k_dsc = 32;
export const k_dsc_3072 = 32; //48;
export const k_dsc_4096 = 64;
export const n_csca = 64;
export const k_csca = 64;
export const k_dsc_4096 = 35;
export const n_csca = 120;
export const k_csca = 35;
export const n_dsc_ecdsa = 64;
export const k_dsc_ecdsa = 4;
export const max_cert_bytes = 1664;

View File

@@ -76,6 +76,7 @@ export function generateCircuitInputsDSC(
let dsc_messagePaddedLen;
[dsc_message_padded, dsc_messagePaddedLen] = shaPad(dscTbsCertUint8Array, max_cert_bytes);
console.log("signatureAlgorithm: ", signatureAlgorithm);
const { n, k } = getNAndK(signatureAlgorithm);
const dscSignature = dscCert.signature;
const encryptedDigest = Array.from(forge.util.createBuffer(dscSignature).getBytes(), (char) =>