Support for multi-sig schemes. ECC (K1/R1) and EdDSA are fully supported. (#599)

Support for multi-sig scheme. ECC (K1/R1) and EdDSA are fully supported.
This commit is contained in:
Konstantinos Chalkias
2017-05-04 18:19:00 +01:00
committed by GitHub
parent fe7d893de2
commit d8fa75654f
28 changed files with 451 additions and 451 deletions

View File

@ -323,7 +323,7 @@ data class NodeRegistration(val node: NodeInfo, val serial: Long, val type: AddO
*/
fun toWire(privateKey: PrivateKey): WireNodeRegistration {
val regSerialized = this.serialize()
val regSig = privateKey.signWithECDSA(regSerialized.bytes, node.legalIdentity.owningKey)
val regSig = privateKey.sign(regSerialized.bytes, node.legalIdentity.owningKey)
return WireNodeRegistration(regSerialized, regSig)
}

View File

@ -198,7 +198,7 @@ object BFTSMaRt {
protected fun sign(bytes: ByteArray): DigitalSignature.WithKey {
val mySigningKey = db.transaction { services.notaryIdentityKey }
return mySigningKey.signWithECDSA(bytes)
return mySigningKey.sign(bytes)
}
// TODO:

View File

@ -54,7 +54,7 @@ class NotaryServiceTests {
val future = runNotaryClient(stx)
val signatures = future.getOrThrow()
signatures.forEach { it.verifyWithECDSA(stx.id) }
signatures.forEach { it.verify(stx.id) }
}
@Test fun `should sign a unique transaction without a timestamp`() {
@ -67,7 +67,7 @@ class NotaryServiceTests {
val future = runNotaryClient(stx)
val signatures = future.getOrThrow()
signatures.forEach { it.verifyWithECDSA(stx.id) }
signatures.forEach { it.verify(stx.id) }
}
@Test fun `should report error for transaction with an invalid timestamp`() {