SecureBlackbox Lite 2020 Java Edition

Questions / Feedback?

CryptoKey Type

This container represents a cryptographic key.

Remarks

This type is a universal placeholder for cryptographic keys.

Fields

Algorithm
String

The algorithm of the cryptographic key. A cryptokey object may hold either symmetric, MAC, or public key.Public key algorithms: RSA, ECDSA, Elgamal, DH.

SB_SYMMETRIC_ALGORITHM_RC4RC4
SB_SYMMETRIC_ALGORITHM_DESDES
SB_SYMMETRIC_ALGORITHM_3DES3DES
SB_SYMMETRIC_ALGORITHM_RC2RC2
SB_SYMMETRIC_ALGORITHM_AES128AES128
SB_SYMMETRIC_ALGORITHM_AES192AES192
SB_SYMMETRIC_ALGORITHM_AES256AES256
SB_SYMMETRIC_ALGORITHM_IDENTITYIdentity
SB_SYMMETRIC_ALGORITHM_BLOWFISHBlowfish
SB_SYMMETRIC_ALGORITHM_CAST128CAST128
SB_SYMMETRIC_ALGORITHM_IDEAIDEA
SB_SYMMETRIC_ALGORITHM_TWOFISHTwofish
SB_SYMMETRIC_ALGORITHM_TWOFISH128Twofish128
SB_SYMMETRIC_ALGORITHM_TWOFISH192Twofish192
SB_SYMMETRIC_ALGORITHM_TWOFISH256Twofish256
SB_SYMMETRIC_ALGORITHM_CAMELLIACamellia
SB_SYMMETRIC_ALGORITHM_CAMELLIA128Camellia128
SB_SYMMETRIC_ALGORITHM_CAMELLIA192Camellia192
SB_SYMMETRIC_ALGORITHM_CAMELLIA256Camellia256
SB_SYMMETRIC_ALGORITHM_SERPENTSerpent
SB_SYMMETRIC_ALGORITHM_SERPENT128Serpent128
SB_SYMMETRIC_ALGORITHM_SERPENT192Serpent192
SB_SYMMETRIC_ALGORITHM_SERPENT256Serpent256
SB_SYMMETRIC_ALGORITHM_SEEDSEED
SB_SYMMETRIC_ALGORITHM_RABBITRabbit
SB_SYMMETRIC_ALGORITHM_SYMMETRICGeneric
SB_SYMMETRIC_ALGORITHM_GOST_28147_1989GOST-28147-1989
SB_SYMMETRIC_ALGORITHM_CHACHA20ChaCha20

SB_HASH_ALGORITHM_SHA1SHA1
SB_HASH_ALGORITHM_SHA224SHA224
SB_HASH_ALGORITHM_SHA256SHA256
SB_HASH_ALGORITHM_SHA384SHA384
SB_HASH_ALGORITHM_SHA512SHA512
SB_HASH_ALGORITHM_MD2MD2
SB_HASH_ALGORITHM_MD4MD4
SB_HASH_ALGORITHM_MD5MD5
SB_HASH_ALGORITHM_RIPEMD160RIPEMD160
SB_HASH_ALGORITHM_CRC32CRC32
SB_HASH_ALGORITHM_SSL3SSL3
SB_HASH_ALGORITHM_GOST_R3411_1994GOST1994
SB_HASH_ALGORITHM_WHIRLPOOLWHIRLPOOL
SB_HASH_ALGORITHM_POLY1305POLY1305
SB_HASH_ALGORITHM_SHA3_224SHA3_224
SB_HASH_ALGORITHM_SHA3_256SHA3_256
SB_HASH_ALGORITHM_SHA3_384SHA3_384
SB_HASH_ALGORITHM_SHA3_512SHA3_512
SB_HASH_ALGORITHM_BLAKE2S_128BLAKE2S_128
SB_HASH_ALGORITHM_BLAKE2S_160BLAKE2S_160
SB_HASH_ALGORITHM_BLAKE2S_224BLAKE2S_224
SB_HASH_ALGORITHM_BLAKE2S_256BLAKE2S_256
SB_HASH_ALGORITHM_BLAKE2B_160BLAKE2B_160
SB_HASH_ALGORITHM_BLAKE2B_256BLAKE2B_256
SB_HASH_ALGORITHM_BLAKE2B_384BLAKE2B_384
SB_HASH_ALGORITHM_BLAKE2B_512BLAKE2B_512
SB_HASH_ALGORITHM_SHAKE_128SHAKE_128
SB_HASH_ALGORITHM_SHAKE_256SHAKE_256
SB_HASH_ALGORITHM_SHAKE_128_LENSHAKE_128_LEN
SB_HASH_ALGORITHM_SHAKE_256_LENSHAKE_256_LEN

Bits
int

The length of the key in bits.

Exportable
boolean

Returns True if the key is exportable (can be serialized into an array of bytes), and False otherwise.

ID
byte[]

Provides access to a storage-specific key identifier. Key identifiers are used by cryptographicproviders to refer to a particular key and/or distinguish between different keys. They aretypically unique within a storage, but there is no guarantee that a particular cryptoproviderwill conform to that (or will assign any key IDs at all).

IV
byte[]

The initialization vector (IV) of a symmetric key. This is normally a public part of a symmetric key, the idea of which is to introduce randomness to the encrypted dataand/or serve as a first block in chaining ciphers.

Key
byte[]

The byte array representation of the key. This may not be available for non-Exportable keys.

Nonce
byte[]

A nonce value associated with a key. It is similar to IV, but its only purpose is to introduce randomness.

Private
boolean

Returns True if the object hosts a private key, and False otherwise.

Public
boolean

Returns True if the object hosts a public key, and False otherwise.

Subject
byte[]

Returns the key subject. This is a cryptoprovider-dependent value,which normally aims to provide some user-friendly insight into thekey owner.

Symmetric
boolean

Returns True if the object contains a symmetric key, and False otherwise.

Valid
boolean

Returns True if this key is valid. The term Valid highly depends onthe kind of the key being stored. A symmetric key is considered validif its length fits the algorithm being set. The validity of anRSA key also ensures that the RSA key elements (primes, exponents,and modulus) are consistent.

Constructors

public CryptoKey();

Creates an empty crypto key object.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox Lite 2020 Java Edition - Version 20.0 [Build 8166]