/** * Options for cryptographic parameter validation */ export interface CryptoParameterOptions { /** * Whether to validate JWT algorithms * @default true */ checkJwtAlgorithms?: boolean; /** * Whether to validate key sizes * @default true */ checkKeySizes?: boolean; /** * Whether to validate KDF parameters * @default true */ checkKdfParameters?: boolean; /** * Whether to validate hash algorithms * @default true */ checkHashAlgorithms?: boolean; /** * Whether to validate cipher suites * @default true */ checkCipherSuites?: boolean; /** * Minimum RSA key size in bits * @default 2048 */ minRsaKeySize?: number; /** * Minimum ECC key size in bits * @default 256 */ minEccKeySize?: number; /** * Minimum AES key size in bits * @default 128 */ minAesKeySize?: number; /** * Minimum PBKDF2 iterations * @default 100000 */ minPbkdf2Iterations?: number; /** * Minimum bcrypt cost factor * @default 10 */ minBcryptCost?: number; /** * Minimum scrypt N parameter (CPU/memory cost) * @default 16384 */ minScryptN?: number; /** * Allow 'none' algorithm in JWT (should be false for security) * @default false */ allowJwtNoneAlgorithm?: boolean; /** * Allow weak hash algorithms (MD5, SHA1) * @default false */ allowWeakHashes?: boolean; /** * Allow export-grade cipher suites * @default false */ allowExportCiphers?: boolean; /** * Custom JWT algorithms to allow (e.g., ['RS256', 'ES256']) */ allowedJwtAlgorithms?: string[]; /** * Custom hash algorithms to allow (e.g., ['SHA256', 'SHA384', 'SHA512']) */ allowedHashAlgorithms?: string[]; } /** * Information about detected cryptographic parameters */ export interface CryptoParameterMatch { type: 'jwt-algorithm' | 'key-size' | 'kdf' | 'hash-algorithm' | 'cipher-suite'; algorithm?: string; keySize?: number; iterations?: number; costFactor?: number; line?: number; column?: number; match: string; context?: Record; } /** * JWT algorithm types */ export type JwtAlgorithm = 'none' | 'HS256' | 'HS384' | 'HS512' | 'RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512'; /** * Hash algorithm types */ export type HashAlgorithm = 'MD5' | 'SHA1' | 'SHA224' | 'SHA256' | 'SHA384' | 'SHA512' | 'SHA3-256' | 'SHA3-384' | 'SHA3-512'; /** * KDF (Key Derivation Function) types */ export type KdfType = 'PBKDF2' | 'bcrypt' | 'scrypt' | 'Argon2'; //# sourceMappingURL=types.d.ts.map