-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add explicit curve params support #102
Comments
I write some sketch for this schema export class FieldID {
@AsnProp({ type: AsnPropTypes.ObjectIdentifier })
public fieldType: string = ""
@AsnProp({ type: AsnPropTypes.Integer })
public curveP: string = "";
}
export class Curve {
@AsnProp({ type: AsnPropTypes.OctetString })
public a: ArrayBuffer = new ArrayBuffer(0)
@AsnProp({ type: AsnPropTypes.OctetString })
public b: ArrayBuffer = new ArrayBuffer(0)
@AsnProp({ type: AsnPropTypes.BitString, optional: true })
public seed?: ArrayBuffer = new ArrayBuffer(0)
}
export class SpecifiedECDomain {
@AsnProp({ type: AsnPropTypes.Integer })
public version: number = 1
@AsnProp({ type: FieldID })
public fieldID: FieldID = new FieldID()
@AsnProp({ type: Curve })
public curve: Curve = new Curve()
@AsnProp({ type: AsnPropTypes.OctetString })
public base: ArrayBuffer = new ArrayBuffer(0)
@AsnProp({ type: AsnPropTypes.Integer })
public order: string = "";
@AsnProp({ type: AsnPropTypes.Integer, optional: true })
public cofactor?: number = 0;
}
@AsnType({ type: AsnTypeTypes.Choice })
export class ECParameters {
@AsnProp({ type: AsnPropTypes.ObjectIdentifier })
public namedCurve?: string;
@AsnProp({ type: SpecifiedECDomain })
public explicitCurve?: SpecifiedECDomain;
constructor(params: Partial<ECParameters> = {}) {
Object.assign(this, params);
}
} |
I'm working on this. I'm clarifying the specification and checking the ASN.1 schema. I'm planning to add new schemas to the |
Thank you. Are you planning to add signature verification for X509 cert's with explicit EC parameters in |
Currently, we have no plans to add signature verification for X.509 certificates with explicit EC parameters in We do have separate modules that implement the WebCrypto interface:
|
@li0ard I've created a PR. Could you please take a look and let me know if this implementation works for you? |
Yes, it works, thanks. After applying this PR, will it be possible to parse a certificate with this parameters via |
|
Hi, can you add support for explicit curve parameters? I know that explicit params must not be used in PKIX, but i need it for verifying MRTD PKI (Document Signers certs, Countries CA's), because their structure described by ICAO 9303 p.12:
OpenSSL seems support conversion between explicit and names parameters.
![image](https://private-user-images.githubusercontent.com/47205258/367613405-ffecff8e-442e-4a7e-87bb-5b7ba391c74c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzI2MzcsIm5iZiI6MTczOTY3MjMzNywicGF0aCI6Ii80NzIwNTI1OC8zNjc2MTM0MDUtZmZlY2ZmOGUtNDQyZS00YTdlLTg3YmItNWI3YmEzOTFjNzRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAyMTg1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2NmUwMjM3NjM5OTRmYmNhM2MyZTQzZGNkY2U2Yjk1MTQ0ZWFlMDYwODJkN2E2MDNhZjJiMzIwOWQ1NzljNmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.lQhw69D7UHkTnNq_hkbDa2n7QCT1cY_MVWLN4O1ud9g)
The text was updated successfully, but these errors were encountered: