Package crypto
SLAes #sleela 2.5 (lib/crypto/SLAes.sleela)
SLAes class
Defines the SLeeLa standard-library type SLAes used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
BLOCK_BYTES | static final int BLOCK_BYTES = 16 | AES block size in bytes (FIPS 197). |
algorithm | String algorithm | No description in source. |
keyBits | int keyBits | 128, 192, or 256 |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
keySet | int keySet | 1 once a valid key size has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
keySize | int keySize(int b) | key_bits must be 128, 192, or 256 (FIPS 197). |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | active() requires enable + a valid algorithm + a valid key size + a ready backend. |
blockSize | int blockSize() | No description in source. |
encryptBlock | int encryptBlock(String in) | Single-block ECB primitive (FIPS 197). Models slc_aes_encrypt_block()/slc_aes_decrypt_block(). |
decryptBlock | int decryptBlock(String in) | No description in source. |
securityNote | String securityNote() | No description in source. |
SLAesGcm #sleela 2.5 (lib/crypto/SLAesGcm.sleela)
SLAesGcm class
Defines the SLeeLa standard-library type SLAesGcm used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | tag verification failed on decrypt |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
RECOMMENDED_IV_BYTES | static final int RECOMMENDED_IV_BYTES = 12 | SP 800-38D recommends a 96-bit (12-byte) nonce and a 16-byte tag. |
MAX_TAG_BYTES | static final int MAX_TAG_BYTES = 16 | No description in source. |
algorithm | String algorithm | No description in source. |
keyBits | int keyBits | 128, 192, or 256 |
tagBytes | int tagBytes | 1..16 (16 recommended) |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
keySet | int keySet | 1 once a valid key size has been accepted |
tagSet | int tagSet | 1 once a valid tag size has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
keySize | int keySize(int b) | key_bits must be 128, 192, or 256. |
tagSize | int tagSize(int t) | tag_len must be 1..16 (SP 800-38D); 16 recommended. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
encrypt | int encrypt(String iv, int ivLen, String aad, String pt) | AEAD encrypt. Models slc_aes_gcm_encrypt(); validates the nonce before dispatch. |
decrypt | int decrypt(String iv, int ivLen, String aad, String ct, String tag) | AEAD decrypt. Models slc_aes_gcm_decrypt(); a bad tag yields ERR_AUTH and the native layer releases no plaintext. |
securityNote | String securityNote() | No description in source. |
SLCertificate #sleela 2.5 (lib/crypto/SLCertificate.sleela)
SLCertificate class
Defines the SLeeLa standard-library type SLCertificate used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | certificate signature did not verify |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | signature algorithm, e.g. "ML-DSA" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once an algorithm name has been accepted |
loaded | int loaded | 1 once a certificate has been parsed |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
load | int load(String encoded) | Parse an encoded certificate (DER/PEM). |
isLoaded | boolean isLoaded() | No description in source. |
verifyAgainst | int verifyAgainst(String issuerPublicKey) | Verify this certificate's signature against an issuer public key. OK = valid, ERR_AUTH = bad signature. |
securityNote | String securityNote() | No description in source. |
SLCertificateStore #sleela 2.5 (lib/crypto/SLCertificateStore.sleela)
SLCertificateStore class
Defines the SLeeLa standard-library type SLCertificateStore used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | No description in source. |
count | int count | number of certificates held |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once an algorithm name has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
size | int size() | No description in source. |
add | int add(String encoded) | Add a parsed certificate to the store. |
clear | int clear() | Clear all held certificates. |
securityNote | String securityNote() | No description in source. |
SLCipher #sleela 2.5 (lib/crypto/SLCipher.sleela)
SLCipher class
Defines the SLeeLa standard-library type SLCipher used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | "AES" | "AES-GCM" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
encrypt | int encrypt(String in) | No description in source. |
decrypt | int decrypt(String in) | No description in source. |
securityNote | String securityNote() | No description in source. |
SLCipherContext #sleela 2.5 (lib/crypto/SLCipherContext.sleela)
SLCipherContext class
Defines the SLeeLa standard-library type SLCipherContext used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | No description in source. |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once an algorithm name has been accepted |
started | int started | 1 between init() and final() |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
init | int init() | Streaming lifecycle: init -> update* -> final. |
update | int update(String chunk) | No description in source. |
finalize | int finalize() | No description in source. |
securityNote | String securityNote() | No description in source. |
serviceName | String serviceName() | ---- common service contract (identity) ----------------------------- SLCipherContext conforms to the SLService lifecycle CONCEPT (configure -> enable/active -> init/update/final -> disable), but is NOT an SLPluginService: it is a cipher context, not a plugin-registry, and its result codes (OK/ERR_PARAM/ERR_AUTH/ERR_UNIMPL) are cryptography-specific and deliberately NOT the shared SLServiceResult vocabulary, so a caller is never misled about an auth failure. serviceName() gives status surfaces a uniform handle across all services. |
SLCipherKey #sleela 2.5 (lib/crypto/SLCipherKey.sleela)
SLCipherKey class
Defines the SLeeLa standard-library type SLCipherKey used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | e.g. "AES" |
keyBits | int keyBits | 128, 192, or 256 |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once an algorithm name has been accepted |
keySet | int keySet | 1 once a valid key size has been accepted |
loaded | int loaded | 1 once key material has been loaded |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
keySize | int keySize(int b) | AES key sizes only (FIPS 197). |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
load | int load(String keyMaterial) | Load raw key bytes and build the native key schedule. |
isLoaded | boolean isLoaded() | No description in source. |
wipe | int wipe() | Best-effort zeroization of the native key schedule. |
securityNote | String securityNote() | No description in source. |
SLDigest #sleela 2.5 (lib/crypto/SLDigest.sleela)
SLDigest class
Defines the SLeeLa standard-library type SLDigest used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | No description in source. |
outBytes | int outBytes | digest length for the selected hash |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported hash name has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | Accept any hash the native layer implements, and record its digest length. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
digestLength | int digestLength() | No description in source. |
digest | int digest(String data) | No description in source. |
securityNote | String securityNote() | No description in source. |
SLHkdf #sleela 2.5 (lib/crypto/SLHkdf.sleela)
SLHkdf class
Defines the SLeeLa standard-library type SLHkdf used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
MAX_OUT_BYTES | static final int MAX_OUT_BYTES = 8160 | RFC 5869 caps expand output at 255 * HashLen; HashLen is 32 for SHA-256. 255 * 32 |
algorithm | String algorithm | No description in source. |
outBytes | int outBytes | requested output keying material length |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
outSet | int outSet | 1 once a valid output size has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
outputSize | int outputSize(int n) | outputSize must be in 1 .. 255*HashLen (RFC 5869). |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
outputLength | int outputLength() | No description in source. |
derive | int derive(String salt, String ikm, String info) | Extract-and-expand in one call. Models slc_hkdf_sha256(salt, ikm, info -> okm). |
securityNote | String securityNote() | No description in source. |
SLHmac #sleela 2.5 (lib/crypto/SLHmac.sleela)
SLHmac class
Defines the SLeeLa standard-library type SLHmac used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | MAC verification failed |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
SHA256_MAC_LEN | static final int SHA256_MAC_LEN = 32 | No description in source. |
SHA512_MAC_LEN | static final int SHA512_MAC_LEN = 64 | No description in source. |
algorithm | String algorithm | No description in source. |
outBytes | int outBytes | MAC length for the selected hash |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | Accept only the two HMAC variants the native layer provides. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
macLength | int macLength() | No description in source. |
sign | int sign(String key, String msg) | Compute a MAC over msg with key. Models slc_hmac_sha256()/slc_hmac_sha512(). |
verify | int verify(String key, String msg, String mac) | Verify a MAC. The native layer compares in constant time (slc_ct_equal); a mismatch yields ERR_AUTH. |
securityNote | String securityNote() | No description in source. |
SLKey #sleela 2.5 (lib/crypto/SLKey.sleela)
SLKey class
Defines the SLeeLa standard-library type SLKey used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | No description in source. |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once an algorithm name has been accepted |
loaded | int loaded | 1 once key material has been loaded |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
load | int load(String keyMaterial) | No description in source. |
isLoaded | boolean isLoaded() | No description in source. |
wipe | int wipe() | No description in source. |
securityNote | String securityNote() | No description in source. |
SLKeyDerivation #sleela 2.5 (lib/crypto/SLKeyDerivation.sleela)
SLKeyDerivation class
Defines the SLeeLa standard-library type SLKeyDerivation used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | No description in source. |
outBytes | int outBytes | requested derived-key length |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
outSet | int outSet | 1 once a valid output size has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | Only HKDF-SHA-256 is currently wired through the native layer. |
outputSize | int outputSize(int n) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
outputLength | int outputLength() | No description in source. |
derive | int derive(String salt, String ikm, String info) | No description in source. |
securityNote | String securityNote() | No description in source. |
SLKeyPair #sleela 2.5 (lib/crypto/SLKeyPair.sleela)
SLKeyPair class
Defines the SLeeLa standard-library type SLKeyPair used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | "ML-KEM" | "ML-DSA" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
generated | int generated | 1 once a key pair has been produced |
backend | int backend | 1 only once a real native implementation is linked |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
generate | int generate() | Generate a fresh key pair; surfaces ERR_UNIMPL while the PQ backend is pending. |
isGenerated | boolean isGenerated() | No description in source. |
securityNote | String securityNote() | No description in source. |
SLMlDsa #sleela 2.5 (lib/crypto/SLMlDsa.sleela)
SLMlDsa class
Defines the SLeeLa standard-library type SLMlDsa used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | signature verification failed |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
parameterSet | String parameterSet | "ML-DSA-44" | "ML-DSA-65" | "ML-DSA-87" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported parameter set has been accepted |
backend | int backend | 1 only once a real native implementation is linked |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String p) | Validate against the three FIPS 204 parameter sets named by CNSA 2.0. |
bindBackend | void bindBackend(int ready) | The VM/OS bridge binding calls this with 1 only when a real ML-DSA implementation is present. It stays 0 while src/pq.c returns ERR_UNIMPL. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | active() reflects real usability: it is false while the PQ backend is pending. |
keygen | int keygen() | Signature operations. Model slc_mldsa_keygen/sign/verify; they surface ERR_UNIMPL until the backend is vendored. verify returns ERR_AUTH on a bad signature. |
sign | int sign(String secretKey, String msg) | No description in source. |
verify | int verify(String publicKey, String msg, String sig) | No description in source. |
securityNote | String securityNote() | No description in source. |
SLMlKem #sleela 2.5 (lib/crypto/SLMlKem.sleela)
SLMlKem class
Defines the SLeeLa standard-library type SLMlKem used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
parameterSet | String parameterSet | "ML-KEM-512" | "ML-KEM-768" | "ML-KEM-1024" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported parameter set has been accepted |
backend | int backend | 1 only once a real native implementation is linked |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String p) | Validate against the three FIPS 203 parameter sets named by CNSA 2.0. |
bindBackend | void bindBackend(int ready) | The VM/OS bridge binding calls this with 1 only when a real ML-KEM implementation is present. It stays 0 while src/pq.c returns ERR_UNIMPL. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | active() reflects real usability: it is false while the PQ backend is pending, so it cannot report ready for an unimplemented primitive. |
keygen | int keygen() | KEM operations. Model slc_mlkem_keygen/encaps/decaps; they surface ERR_UNIMPL until the backend is vendored. |
encapsulate | int encapsulate(String publicKey) | No description in source. |
decapsulate | int decapsulate(String secretKey, String ciphertext) | No description in source. |
securityNote | String securityNote() | No description in source. |
SLNationalSuite #sleela 2.5 (lib/crypto/SLNationalSuite.sleela)
SLNationalSuite class
Defines the SLeeLa standard-library type SLNationalSuite used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
suite | String suite | "CNSA-1.0" | "CNSA-2.0" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported suite has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String s) | Accept only the two named suites. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
members | String members() | Classical members are implemented and KAT-verified in /crypto today. |
pendingMembers | String pendingMembers() | The two CNSA 2.0 post-quantum members whose native backend is still pending (slc_mlkem_* / slc_mldsa_* return ERR_UNIMPL). Surfaced so callers can tell which roster entries are not yet usable. |
memberReady | int memberReady(String name) | 1 if the named member is implemented and callable today, 0 if pending, ERR_PARAM if unknown. |
securityNote | String securityNote() | No description in source. |
SLNonce #sleela 2.5 (lib/crypto/SLNonce.sleela)
SLNonce class
Defines the SLeeLa standard-library type SLNonce used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
GCM_NONCE_BYTES | static final int GCM_NONCE_BYTES = 12 | AES-GCM recommends a 96-bit (12-byte) nonce (SP 800-38D). |
algorithm | String algorithm | e.g. "AES-GCM" |
sizeBytes | int sizeBytes | requested nonce length |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once an algorithm name has been accepted |
sizeSet | int sizeSet | 1 once a valid nonce size has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
size | int size(int n) | Nonce length must be positive; reject zero/negative sizes. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
nonceLength | int nonceLength() | No description in source. |
generate | int generate() | Draw a fresh random nonce of the configured size from the native CSPRNG. |
securityNote | String securityNote() | No description in source. |
SLPrivateKey #sleela 2.5 (lib/crypto/SLPrivateKey.sleela)
SLPrivateKey class
Defines the SLeeLa standard-library type SLPrivateKey used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | "ML-KEM" | "ML-DSA" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
loaded | int loaded | 1 once a private key has been loaded |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
load | int load(String encoded) | Import an encoded private key. |
isLoaded | boolean isLoaded() | No description in source. |
wipe | int wipe() | Best-effort zeroization of the native secret key material. |
securityNote | String securityNote() | No description in source. |
SLPublicKey #sleela 2.5 (lib/crypto/SLPublicKey.sleela)
SLPublicKey class
Defines the SLeeLa standard-library type SLPublicKey used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | "ML-KEM" | "ML-DSA" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
loaded | int loaded | 1 once a public key has been loaded |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
load | int load(String encoded) | Import an encoded public key. |
isLoaded | boolean isLoaded() | No description in source. |
export | int export() | Export the encoded public key. |
securityNote | String securityNote() | No description in source. |
SLSha256 #sleela 2.5 (lib/crypto/SLSha256.sleela)
SLSha256 class
Defines the SLeeLa standard-library type SLSha256 used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
DIGEST_LEN | static final int DIGEST_LEN = 32 | Native digest length for SHA-256. |
algorithm | String algorithm | No description in source. |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | Accept only the algorithm name this facade bridges to. |
bindBackend | void bindBackend(int ready) | Declare native backend availability (set by the VM/OS bridge binding). |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | active() is only true when enabled, configured, AND the native backend is ready, so it cannot report usable while the computation path is unavailable. |
digestLength | int digestLength() | No description in source. |
digest | int digest(String data) | One-shot hash over data. Models slc_sha256(); returns a status code. |
securityNote | String securityNote() | No description in source. |
SLSha3 #sleela 2.5 (lib/crypto/SLSha3.sleela)
SLSha3 class
Defines the SLeeLa standard-library type SLSha3 used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
SHA3_256_DIGEST_LEN | static final int SHA3_256_DIGEST_LEN = 32 | Native digest lengths. |
SHA3_512_DIGEST_LEN | static final int SHA3_512_DIGEST_LEN = 64 | No description in source. |
algorithm | String algorithm | No description in source. |
outBytes | int outBytes | selected digest length (32 or 64) |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | Accept only the two variants this facade bridges to. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
digestLength | int digestLength() | No description in source. |
digest | int digest(String data) | One-shot hash over data. Models slc_sha3_256()/slc_sha3_512(); returns a status code. |
securityNote | String securityNote() | No description in source. |
SLSha512 #sleela 2.5 (lib/crypto/SLSha512.sleela)
SLSha512 class
Defines the SLeeLa standard-library type SLSha512 used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
SHA384_DIGEST_LEN | static final int SHA384_DIGEST_LEN = 48 | Native digest lengths. |
SHA512_DIGEST_LEN | static final int SHA512_DIGEST_LEN = 64 | No description in source. |
algorithm | String algorithm | No description in source. |
outBytes | int outBytes | selected digest length (48 or 64) |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | Accept only the two variants this facade bridges to. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
digestLength | int digestLength() | No description in source. |
digest | int digest(String data) | One-shot hash over data. Models slc_sha384()/slc_sha512(); returns a status code. |
securityNote | String securityNote() | No description in source. |
SLSignature #sleela 2.5 (lib/crypto/SLSignature.sleela)
SLSignature class
Defines the SLeeLa standard-library type SLSignature used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | No description in source. |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | "ML-DSA" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
backend | int backend | 1 only once a real native implementation is linked |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
sign | int sign(String privateKey, String msg) | Produce a signature over msg with the private key; ERR_UNIMPL while pending. |
securityNote | String securityNote() | No description in source. |
SLTrustStore #sleela 2.5 (lib/crypto/SLTrustStore.sleela)
SLTrustStore class
Defines the SLeeLa standard-library type SLTrustStore used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | chain did not validate to a trust anchor |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | No description in source. |
anchors | int anchors | number of trust anchors held |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once an algorithm name has been accepted |
backend | int backend | 1 when the native /crypto backend is linked and ready |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
anchorCount | int anchorCount() | No description in source. |
addAnchor | int addAnchor(String encoded) | Install a trusted root/anchor certificate. |
validateChain | int validateChain(String leafEncoded) | Validate a certificate chain to a trust anchor. OK = trusted, ERR_AUTH = did not chain to an anchor. |
securityNote | String securityNote() | No description in source. |
SLVerifier #sleela 2.5 (lib/crypto/SLVerifier.sleela)
SLVerifier class
Defines the SLeeLa standard-library type SLVerifier used within the crypto library family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | Status codes mirror slcrypto_status in crypto/include/slcrypto.h. |
ERR_PARAM | static final int ERR_PARAM = -1 | No description in source. |
ERR_AUTH | static final int ERR_AUTH = -2 | signature did not verify |
ERR_UNIMPL | static final int ERR_UNIMPL = -3 | No description in source. |
algorithm | String algorithm | "ML-DSA" |
state | int state | 1 = enabled, 0 = disabled |
configured | int configured | 1 once a supported algorithm name has been accepted |
backend | int backend | 1 only once a real native implementation is linked |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | int configure(String a) | No description in source. |
bindBackend | void bindBackend(int ready) | No description in source. |
backendReady | boolean backendReady() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
active | boolean active() | No description in source. |
verify | int verify(String publicKey, String msg, String sig) | Verify sig over msg with the public key. OK = valid, ERR_AUTH = invalid, ERR_UNIMPL while the PQ backend is pending. |
securityNote | String securityNote() | No description in source. |