object CryptoInterface
- Source
- CryptoInterface.scala
- Alphabetic
- By Inheritance
- CryptoInterface
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class CryptoDHState extends IFinalizable
- class CryptoState extends IFinalizable
- class CryptoStateWithMAC extends CryptoState
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def MD5MAC(key: ByteVector, message: ByteVector, bytesWanted: Int): ByteVector
- final val MD5_MAC_SIZE: Int(16)
- final val PSCRYPTO_VERSION_MAJOR: Int(1)
- final val PSCRYPTO_VERSION_MINOR: Int(1)
- final val RC5_BLOCK_SIZE: Int(8)
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final val fullLibName: String("pscrypto")
- val functionsList: List[String]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def initialize(): Unit
Used to initialize the crypto library at runtime.
Used to initialize the crypto library at runtime. The version is checked and all functions are mapped.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final val libName: String("pscrypto")
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def printEnvironment(): Unit
Used for debugging object loading
- final val psLib: Library
NOTE: this is a single, global shared library for the entire server's crypto needs
NOTE: this is a single, global shared library for the entire server's crypto needs
Unfortunately, access to this object didn't used to be synchronized. I noticed that tests for this module were hanging ("arrive at a shared secret" & "must fail to agree on a secret..."). This heisenbug was responsible for failed Travis test runs and developer issues as well. Using Windows minidumps, I tracked the issue to a single thread deep in pscrypto.dll. It appeared to be executing an EB FE instruction (on Intel x86 this is
jmp $-2or jump to self), which is an infinite loop. The stack trace made little to no sense and after banging my head on the wall for many hours, I assumed that something deep in CryptoPP, the libgcc libraries, or MSVC++ was the cause (or myself). Now all access to pscrypto functions that allocate and deallocate memory (DH_Start, RC5_Init) are synchronized. This *appears* to have fixed the problem. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def verifyMAC(mac1: ByteVector, mac2: ByteVector): Boolean
Checks if two Message Authentication Codes are the same in constant time, preventing a timing attack for MAC forgery
Checks if two Message Authentication Codes are the same in constant time, preventing a timing attack for MAC forgery
- mac1
A MAC value
- mac2
Another MAC value
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()