fieldSizeBytes

fun fieldSizeBytes(algorithm: Algorithm): Int?

Returns the EC field element size in bytes for ECDSA-capable algorithms, or null for algorithms that are not ECDSA (Ed25519, RSA, BLS, custom).

  • secp256k1, P-256 → 32 (P1363 signature = 64 bytes)

  • P-384 → 48 (P1363 signature = 96 bytes)

  • P-521 → 66 (P1363 signature = 132 bytes)