All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scorex.crypto.EllipticCurveImpl.scala Maven / Gradle / Ivy

There is a newer version: 1.5.1
Show newest version
package scorex.crypto

import scorex.account.PrivateKeyAccount
import scorex.crypto.singing.Curve25519
import scorex.crypto.singing.SigningFunctions.{MessageToSign, Signature}

/**
  * This implementation is being used from many places in the code. We consider easy switching from one
  * EC implementation from another as possible option, while switching to some other signature schemes
  * (e.g. hash-based signatures) will require a lot of code changes around the project(at least because of
  * big signature size).
  */
object EllipticCurveImpl extends Curve25519 {
  def sign(account: PrivateKeyAccount, message: MessageToSign): Signature = sign(account.privateKey, message)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy