IPWorks Encrypt 2020 Python Edition

Questions / Feedback?

key_algorithm Property

This property holds the algorithm associated with the key.

Syntax

def get_key_algorithm() -> int: ...
def set_key_algorithm(value: int) -> None: ...

key_algorithm = property(get_key_algorithm, set_key_algorithm)

Default Value

0

Remarks

This property holds the algorithm associated with the key. Possible values are:

  • 0 (eaSecp256r1)
  • 1 (eaSecp384r1)
  • 2 (eaSecp521r1)
  • 3 (eaEd25519)
  • 4 (eaEd448)
  • 5 (eaX25519)
  • 6 (eaX448)
  • 7 (eaSecp160k1)
  • 8 (eaSecp192k1)
  • 9 (eaSecp224k1)
  • 10 (eaSecp256k1)

When assigning a key using the PEM formatted key_private_key and key_public_key the key_algorithm property will be automatically updated with the key algorithm.

When assigning a key using the raw key parameters (keyk, key_rx, and key_ry for NIST or key_x_pk, and key_x_sk for Curve25519/Curve448) the key_algorithm property must be set manually to the key algorithm.

The following table summarizes the supported operations for keys created with each algorithm:

KeyAlgorithmSupported Operations
secp256r1ECDH/ECIES/ECDSA (on_compute_secret, on_encrypt, on_decrypt, on_sign, and on_verify_signature)
secp384r1ECDH/ECIES/ECDSA (on_compute_secret, on_encrypt, on_decrypt, on_sign, and on_verify_signature)
secp521r1ECDH/ECIES/ECDSA (on_compute_secret, on_encrypt, on_decrypt, on_sign, and on_verify_signature)
x25519ECDH (on_compute_secret)
x448ECDH (on_compute_secret)
ed25519EdDSA (on_sign and on_verify_signature)
ed448EdDSA (on_sign and on_verify_signature)
eaSecp160k1ECDH/ECIES/ECDSA (on_compute_secret, on_encrypt, on_decrypt, on_sign, and on_verify_signature)
eaSecp192k1ECDH/ECIES/ECDSA (on_compute_secret, on_encrypt, on_decrypt, on_sign, and on_verify_signature)
eaSecp224k1ECDH/ECIES/ECDSA (on_compute_secret, on_encrypt, on_decrypt, on_sign, and on_verify_signature)
eaSecp256k1ECDH/ECIES/ECDSA (on_compute_secret, on_encrypt, on_decrypt, on_sign, and on_verify_signature)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 Python Edition - Version 20.0 [Build 8155]