mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
add only rsa test
This commit is contained in:
@@ -100,6 +100,7 @@ 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 k_dsc = 32;
|
||||
export const k_dsc_3072 = 48;
|
||||
export const n_csca = 120;
|
||||
|
||||
@@ -6,6 +6,7 @@ import { SMT } from '@openpassport/zk-kit-smt';
|
||||
import forge from 'node-forge';
|
||||
import {
|
||||
n_dsc,
|
||||
n_dsc_3072,
|
||||
k_dsc,
|
||||
k_dsc_3072,
|
||||
n_dsc_ecdsa,
|
||||
@@ -30,7 +31,7 @@ export function formatMrz(mrz: string) {
|
||||
|
||||
export function getNAndK(sigAlg: SignatureAlgorithm) {
|
||||
if (sigAlg === 'rsa_sha256_65537_3072') {
|
||||
return { n: n_dsc, k: k_dsc_3072 }; // 3072/32 = 96
|
||||
return { n: n_dsc_3072, k: k_dsc }; // 3072/32 = 96
|
||||
}
|
||||
|
||||
if (sigAlg.startsWith('ecdsa_')) {
|
||||
|
||||
Reference in New Issue
Block a user