NDNts

    Interface GenParams

    Key generation parameters.

    interface GenParams {
        curve?: "P-256" | "P-384" | "P-521";
        importPkcs8?: [
            pkcs8: Uint8Array<ArrayBufferLike>,
            spki: Uint8Array<ArrayBufferLike>,
        ];
    }
    Index

    Properties

    Properties

    curve?: "P-256" | "P-384" | "P-521"

    EC curve.

    During key generation when importPkcs8 is absent, the default is "P-256". During key import when importPkcs8 is specified, this is auto-detected from SPKI.

    importPkcs8?: [
        pkcs8: Uint8Array<ArrayBufferLike>,
        spki: Uint8Array<ArrayBufferLike>,
    ]

    Import PKCS#8 private key and SPKI public key instead of generating.

    If curve is also specified, it must match the SPKI public key.

    MMNEPVFCICPMFPCPTTAAATR