ConstTime

org.sigilaris.core.crypto.internal.CryptoParams.ConstTime
object ConstTime

Constant-time cryptographic operations to prevent timing attacks.

Attributes

Source
CryptoParams.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ConstTime.type

Members list

Value members

Concrete methods

def equalsBytes(a: Array[Byte], b: Array[Byte]): Boolean

Constant-time byte array equality comparison.

Constant-time byte array equality comparison.

Compares two byte arrays in constant time to prevent timing attacks. Always scans the full length of the longer array.

Value parameters

a

first byte array

b

second byte array

Attributes

Returns

true if arrays are equal, false otherwise

Note

Execution time is independent of array contents, preventing timing side-channels

Source
CryptoParams.scala
def zeroize(arrays: Array[Byte]*): Unit

Securely zeroes out sensitive byte arrays.

Securely zeroes out sensitive byte arrays.

Overwrites each byte with 0 to clear sensitive data from memory. Use this for private keys, nonces, and other secrets.

Value parameters

arrays

variable number of byte arrays to zeroize

Attributes

Note

Does not guarantee clearing data from CPU caches or swap

Source
CryptoParams.scala