Skip to content

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leif-ibsen committed Aug 4, 2021
1 parent 048e68d commit af585f7
Show file tree
Hide file tree
Showing 62 changed files with 83 additions and 815 deletions.
8 changes: 4 additions & 4 deletions Package.swift
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
// swift-tools-version:5.1
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftECC",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "SwiftECC",
targets: ["SwiftECC"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/leif-ibsen/ASN1", from: "1.2.1"),
.package(url: "https://github.com/leif-ibsen/ASN1", from: "2.0.0"),
.package(url: "https://github.com/leif-ibsen/BigInt", from: "1.2.5"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "SwiftECC",
dependencies: ["ASN1", "BigInt"]),
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SwiftECC requires Swift 5.0. It also requires that the Int and UInt types be 64
In your project Package.swift file add a dependency like<br/>

dependencies: [
.package(url: "https://github.com/leif-ibsen/SwiftECC", from: "1.1.0"),
.package(url: "https://github.com/leif-ibsen/SwiftECC", from: "2.0.0"),
]

<h2><b>Basics</b></h2>
Expand Down Expand Up @@ -336,7 +336,7 @@ was measured on a MacBook Pro 2018, 2,2 GHz 6-Core Intel Core i7. The results ar
The SwiftECC package depends on the ASN1 and BigInt packages

dependencies: [
.package(url: "https://github.com/leif-ibsen/ASN1", from: "1.2.1"),
.package(url: "https://github.com/leif-ibsen/ASN1", from: "2.0.0"),
.package(url: "https://github.com/leif-ibsen/BigInt", from: "1.2.5"),
],

Expand Down
70 changes: 2 additions & 68 deletions Sources/SwiftECC/Domain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public class Domain: CustomStringConvertible {
// MARK: - Constants

/// Prime characteristic domain OID
public static let OID_P = ASN1ObjectIdentifier("1.2.840.10045.1.1")
public static let OID_P = ASN1ObjectIdentifier("1.2.840.10045.1.1")!
/// Characteristic 2 domain OID
public static let OID_2 = ASN1ObjectIdentifier("1.2.840.10045.1.2")
public static let OID_2 = ASN1ObjectIdentifier("1.2.840.10045.1.2")!


// MARK: Static Methods
Expand Down Expand Up @@ -303,18 +303,6 @@ public class Domain: CustomStringConvertible {

// MARK: Instance Methods

/// Doubles a curve Point - DEPRECATED, use *doublePoint* instead
///
/// - Precondition: *self* contains *p*
/// - Parameters:
/// - p: A curve point
/// - Returns: p + p
@available(*, deprecated, message: "use doublePoint instead")
public func double(_ p: Point) -> Point {
precondition(self.contains(p))
return self.characteristic2 ? self.domain2!.double(Point2.fromPoint(domain2!.rp, p)).toPoint() : self.domainP!.double(p)
}

/// Doubles a curve Point
///
/// - Parameters:
Expand All @@ -328,20 +316,6 @@ public class Domain: CustomStringConvertible {
return self.characteristic2 ? self.domain2!.double(Point2.fromPoint(domain2!.rp, p)).toPoint() : self.domainP!.double(p)
}

/// Adds two curve Points - DEPRECATED, use *addPoints* instead
///
/// - Precondition: *self* contains *p1* and *self* contains *p2*
/// - Parameters:
/// - p1: The first curve point
/// - p2: The second curve point
/// - Returns: p1 + p2
@available(*, deprecated, message: "use addPoints instead")
public func add(_ p1: Point, _ p2: Point) -> Point {
precondition(self.contains(p1))
precondition(self.contains(p2))
return self.characteristic2 ? self.domain2!.add(Point2.fromPoint(domain2!.rp, p1), Point2.fromPoint(domain2!.rp, p2)).toPoint() : self.domainP!.add(p1, p2)
}

/// Adds two curve Points
///
/// - Parameters:
Expand All @@ -356,20 +330,6 @@ public class Domain: CustomStringConvertible {
return self.characteristic2 ? self.domain2!.add(Point2.fromPoint(domain2!.rp, p1), Point2.fromPoint(domain2!.rp, p2)).toPoint() : self.domainP!.add(p1, p2)
}

/// Subtracts two curve Points - DEPRECATED, use *subtractPoints* instead
///
/// - Precondition: *self* contains *p1* and *self* contains *p2*
/// - Parameters:
/// - p1: The first curve point
/// - p2: The second curve point
/// - Returns: p1 - p2
@available(*, deprecated, message: "use subtractPoints instead")
public func subtract(_ p1: Point, _ p2: Point) -> Point {
precondition(self.contains(p1))
precondition(self.contains(p2))
return self.characteristic2 ? self.domain2!.subtract(Point2.fromPoint(domain2!.rp, p1), Point2.fromPoint(domain2!.rp, p2)).toPoint() : self.domainP!.subtract(p1, p2)
}

/// Subtracts two curve Points
///
/// - Parameters:
Expand All @@ -384,18 +344,6 @@ public class Domain: CustomStringConvertible {
return self.characteristic2 ? self.domain2!.subtract(Point2.fromPoint(domain2!.rp, p1), Point2.fromPoint(domain2!.rp, p2)).toPoint() : self.domainP!.subtract(p1, p2)
}

/// Negates a curve Point - DEPRECATED, use *negatePoint* instead
///
/// - Precondition: *self* contains *p*
/// - Parameters:
/// - p: A curve point
/// - Returns: -p
@available(*, deprecated, message: "use negatePoint instead")
public func negate(_ p: Point) -> Point {
precondition(self.contains(p))
return self.characteristic2 ? self.domain2!.negate(Point2.fromPoint(domain2!.rp, p)).toPoint() : self.domainP!.negate(p)
}

/// Negates a curve Point
///
/// - Parameters:
Expand All @@ -409,20 +357,6 @@ public class Domain: CustomStringConvertible {
return self.characteristic2 ? self.domain2!.negate(Point2.fromPoint(domain2!.rp, p)).toPoint() : self.domainP!.negate(p)
}

/// Multiplies a curve Point by an integer - DEPRECATED, use *multiplyPoint* instead
///
/// - Precondition: *self* contains *p*
/// - Parameters:
/// - p: The curve point to multiply
/// - n: The integer to multiply with
/// - Returns: n * p
@available(*, deprecated, message: "use multiplyPoint instead")
public func multiply(_ p: Point, _ n: BInt) -> Point {
precondition(self.contains(p))
let multiplier = n.mod(self.order)
return self.characteristic2 ? self.domain2!.multiply(Point2.fromPoint(domain2!.rp, p), multiplier).toPoint() : self.domainP!.multiply(p, multiplier)
}

/// Multiplies a curve Point by an integer
///
/// - Parameters:
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/Domain2/EC163.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class EC163k1: Domain2 {
static let gy = BInt("289070fb05d38ff58321f2e800536d538ccdaa3d9", radix: 16)!
static let order = BInt("4000000000000000000020108a2e0cc0d99f8a5ef", radix: 16)!
static let cofactor = 2
static let oid = ASN1ObjectIdentifier("1.3.132.0.1")
static let oid = ASN1ObjectIdentifier("1.3.132.0.1")!

init() {
super.init(EC163k1.name, EC163k1.rp, EC163k1.a, EC163k1.b, EC163k1.gx, EC163k1.gy, EC163k1.order, EC163k1.cofactor, EC163k1.oid)
Expand All @@ -44,7 +44,7 @@ class EC163r2: Domain2 {
static let gy = BInt("0d51fbc6c71a0094fa2cdd545b11c5c0c797324f1", radix: 16)!
static let order = BInt("40000000000000000000292fe77e70c12a4234c33", radix: 16)!
static let cofactor = 2
static let oid = ASN1ObjectIdentifier("1.3.132.0.15")
static let oid = ASN1ObjectIdentifier("1.3.132.0.15")!

init() {
super.init(EC163r2.name, EC163r2.rp, EC163r2.a, EC163r2.b, EC163r2.gx, EC163r2.gy, EC163r2.order, EC163r2.cofactor, EC163r2.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/Domain2/EC233.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class EC233k1: Domain2 {
static let gy = BInt("1db537dece819b7f70f555a67c427a8cd9bf18aeb9b56e0c11056fae6a3", radix: 16)!
static let order = BInt("8000000000000000000000000000069d5bb915bcd46efb1ad5f173abdf", radix: 16)! /// The cofactor
static let cofactor = 4
static let oid = ASN1ObjectIdentifier("1.3.132.0.26")
static let oid = ASN1ObjectIdentifier("1.3.132.0.26")!

init() {
super.init(EC233k1.name, EC233k1.rp, EC233k1.a, EC233k1.b, EC233k1.gx, EC233k1.gy, EC233k1.order, EC233k1.cofactor, EC233k1.oid)
Expand All @@ -44,7 +44,7 @@ class EC233r1: Domain2 {
static let gy = BInt("1006a08a41903350678e58528bebf8a0beff867a7ca36716f7e01f81052", radix: 16)!
static let order = BInt("1000000000000000000000000000013e974e72f8a6922031d2603cfe0d7", radix: 16)!
static let cofactor = 2
static let oid = ASN1ObjectIdentifier("1.3.132.0.27")
static let oid = ASN1ObjectIdentifier("1.3.132.0.27")!

init() {
super.init(EC233r1.name, EC233r1.rp, EC233r1.a, EC233r1.b, EC233r1.gx, EC233r1.gy, EC233r1.order, EC233r1.cofactor, EC233r1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/Domain2/EC283.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class EC283k1: Domain2 {
static let gy = BInt("1ccda380f1c9e318d90f95d07e5426fe87e45c0e8184698e45962364e34116177dd2259", radix: 16)!
static let order = BInt("1ffffffffffffffffffffffffffffffffffe9ae2ed07577265dff7f94451e061e163c61", radix: 16)!
static let cofactor = 4
static let oid = ASN1ObjectIdentifier("1.3.132.0.16")
static let oid = ASN1ObjectIdentifier("1.3.132.0.16")!

init() {
super.init(EC283k1.name, EC283k1.rp, EC283k1.a, EC283k1.b, EC283k1.gx, EC283k1.gy, EC283k1.order, EC283k1.cofactor, EC283k1.oid)
Expand All @@ -44,7 +44,7 @@ class EC283r1: Domain2 {
static let gy = BInt("3676854fe24141cb98fe6d4b20d02b4516ff702350eddb0826779c813f0df45be8112f4", radix: 16)!
static let order = BInt("3ffffffffffffffffffffffffffffffffffef90399660fc938a90165b042a7cefadb307", radix: 16)!
static let cofactor = 2
static let oid = ASN1ObjectIdentifier("1.3.132.0.17")
static let oid = ASN1ObjectIdentifier("1.3.132.0.17")!

init() {
super.init(EC283r1.name, EC283r1.rp, EC283r1.a, EC283r1.b, EC283r1.gx, EC283r1.gy, EC283r1.order, EC283r1.cofactor, EC283r1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/Domain2/EC409.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class EC409k1: Domain2 {
static let gy = BInt("1e369050b7c4e42acba1dacbf04299c3460782f918ea427e6325165e9ea10e3da5f6c42e9c55215aa9ca27a5863ec48d8e0286b", radix: 16)!
static let order = BInt("7ffffffffffffffffffffffffffffffffffffffffffffffffffe5f83b2d4ea20400ec4557d5ed3e3e7ca5b4b5c83b8e01e5fcf", radix: 16)!
static let cofactor = 4
static let oid = ASN1ObjectIdentifier("1.3.132.0.36")
static let oid = ASN1ObjectIdentifier("1.3.132.0.36")!

init() {
super.init(EC409k1.name, EC409k1.rp, EC409k1.a, EC409k1.b, EC409k1.gx, EC409k1.gy, EC409k1.order, EC409k1.cofactor, EC409k1.oid)
Expand All @@ -44,7 +44,7 @@ class EC409r1: Domain2 {
static let gy = BInt("61b1cfab6be5f32bbfa78324ed106a7636b9c5a7bd198d0158aa4f5488d08f38514f1fdf4b4f40d2181b3681c364ba0273c706", radix: 16)!
static let order = BInt("10000000000000000000000000000000000000000000000000001e2aad6a612f33307be5fa47c3c9e052f838164cd37d9a21173", radix: 16)!
static let cofactor = 2
static let oid = ASN1ObjectIdentifier("1.3.132.0.37")
static let oid = ASN1ObjectIdentifier("1.3.132.0.37")!

init() {
super.init(EC409r1.name, EC409r1.rp, EC409r1.a, EC409r1.b, EC409r1.gx, EC409r1.gy, EC409r1.order, EC409r1.cofactor, EC409r1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/Domain2/EC571.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class EC571k1: Domain2 {
static let gy = BInt("349dc807f4fbf374f4aeade3bca95314dd58cec9f307a54ffc61efc006d8a2c9d4979c0ac44aea74fbebbb9f772aedcb620b01a7ba7af1b320430c8591984f601cd4c143ef1c7a3", radix: 16)!
static let order = BInt("20000000000000000000000000000000000000000000000000000000000000000000000131850e1f19a63e4b391a8db917f4138b630d84be5d639381e91deb45cfe778f637c1001", radix: 16)!
static let cofactor = 4
static let oid = ASN1ObjectIdentifier("1.3.132.0.38")
static let oid = ASN1ObjectIdentifier("1.3.132.0.38")!

init() {
super.init(EC571k1.name, EC571k1.rp, EC571k1.a, EC571k1.b, EC571k1.gx, EC571k1.gy, EC571k1.order, EC571k1.cofactor, EC571k1.oid)
Expand All @@ -44,7 +44,7 @@ class EC571r1: Domain2 {
static let gy = BInt("37bf27342da639b6dccfffeb73d69d78c6c27a6009cbbca1980f8533921e8a684423e43bab08a576291af8f461bb2a8b3531d2f0485c19b16e2f1516e23dd3c1a4827af1b8ac15b", radix: 16)!
static let order = BInt("3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47", radix: 16)!
static let cofactor = 2
static let oid = ASN1ObjectIdentifier("1.3.132.0.39")
static let oid = ASN1ObjectIdentifier("1.3.132.0.39")!

init() {
super.init(EC571r1.name, EC571r1.rp, EC571r1.a, EC571r1.b, EC571r1.gx, EC571r1.gy, EC571r1.order, EC571r1.cofactor, EC571r1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/DomainP/BP160.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BP160r1: DomainP {
static let gy = BInt("1667cb477a1a8ec338f94741669c976316da6321", radix: 16)!
static let order = BInt("e95e4a5f737059dc60df5991d45029409e60fc09", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.1")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.1")!

init() {
super.init(BP160r1.name, BP160r1.p, BP160r1.a, BP160r1.b, BP160r1.gx, BP160r1.gy, BP160r1.order, BP160r1.cofactor, BP160r1.oid)
Expand All @@ -36,7 +36,7 @@ class BP160t1: DomainP {
static let gy = BInt("add6718b7c7c1961f0991b842443772152c9e0ad", radix: 16)!
static let order = BInt("e95e4a5f737059dc60df5991d45029409e60fc09", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.2")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.2")!

init() {
super.init(BP160t1.name, BP160t1.p, BP160t1.a, BP160t1.b, BP160t1.gx, BP160t1.gy, BP160t1.order, BP160t1.cofactor, BP160t1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/DomainP/BP192.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BP192r1: DomainP {
static let gy = BInt("14b690866abd5bb88b5f4828c1490002e6773fa2fa299b8f", radix: 16)!
static let order = BInt("c302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.3")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.3")!

init() {
super.init(BP192r1.name, BP192r1.p, BP192r1.a, BP192r1.b, BP192r1.gx, BP192r1.gy, BP192r1.order, BP192r1.cofactor, BP192r1.oid)
Expand All @@ -36,7 +36,7 @@ class BP192t1: DomainP {
static let gy = BInt("097e2c5667c2223a902ab5ca449d0084b7e5b3de7ccc01c9", radix: 16)!
static let order = BInt("c302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.4")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.4")!

init() {
super.init(BP192t1.name, BP192t1.p, BP192t1.a, BP192t1.b, BP192t1.gx, BP192t1.gy, BP192t1.order, BP192t1.cofactor, BP192t1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/DomainP/BP224.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BP224r1: DomainP {
static let gy = BInt("58aa56f772c0726f24c6b89e4ecdac24354b9e99caa3f6d3761402cd", radix: 16)!
static let order = BInt("d7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939f", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.5")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.5")!

init() {
super.init(BP224r1.name, BP224r1.p, BP224r1.a, BP224r1.b, BP224r1.gx, BP224r1.gy, BP224r1.order, BP224r1.cofactor, BP224r1.oid)
Expand All @@ -36,7 +36,7 @@ class BP224t1: DomainP {
static let gy = BInt("0374e9f5143e568cd23f3f4d7c0d4b1e41c8cc0d1c6abd5f1a46db4c", radix: 16)!
static let order = BInt("d7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939f", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.6")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.6")!

init() {
super.init(BP224t1.name, BP224t1.p, BP224t1.a, BP224t1.b, BP224t1.gx, BP224t1.gy, BP224t1.order, BP224r1.cofactor, BP224t1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/DomainP/BP256.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BP256r1: DomainP {
static let gy = BInt("547ef835c3dac4fd97f8461a14611dc9c27745132ded8e545c1d54c72f046997", radix: 16)!
static let order = BInt("a9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.7")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.7")!

init() {
super.init(BP256r1.name, BP256r1.p, BP256r1.a, BP256r1.b, BP256r1.gx, BP256r1.gy, BP256r1.order, BP256r1.cofactor, BP256r1.oid)
Expand All @@ -36,7 +36,7 @@ class BP256t1: DomainP {
static let gy = BInt("2d996c823439c56d7f7b22e14644417e69bcb6de39d027001dabe8f35b25c9be", radix: 16)!
static let order = BInt("a9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.8")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.8")!

init() {
super.init(BP256t1.name, BP256t1.p, BP256t1.a, BP256t1.b, BP256t1.gx, BP256t1.gy, BP256t1.order, BP256t1.cofactor, BP256t1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/DomainP/BP320.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BP320r1: DomainP {
static let gy = BInt("14fdd05545ec1cc8ab4093247f77275e0743ffed117182eaa9c77877aaac6ac7d35245d1692e8ee1", radix: 16)!
static let order = BInt("d35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59311", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.9")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.9")!

init() {
super.init(BP320r1.name, BP320r1.p, BP320r1.a, BP320r1.b, BP320r1.gx, BP320r1.gy, BP320r1.order, BP320r1.cofactor, BP320r1.oid)
Expand All @@ -36,7 +36,7 @@ class BP320t1: DomainP {
static let gy = BInt("63ba3a7a27483ebf6671dbef7abb30ebee084e58a0b077ad42a5a0989d1ee71b1b9bc0455fb0d2c3", radix: 16)!
static let order = BInt("d35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59311", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.10")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.10")!

init() {
super.init(BP320t1.name, BP320t1.p, BP320t1.a, BP320t1.b, BP320t1.gx, BP320t1.gy, BP320t1.order, BP320t1.cofactor, BP320t1.oid)
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftECC/DomainP/BP384.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BP384r1: DomainP {
static let gy = BInt("8abe1d7520f9c2a45cb1eb8e95cfd55262b70b29feec5864e19c054ff99129280e4646217791811142820341263c5315", radix: 16)!
static let order = BInt("8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046565", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.11")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.11")!

init() {
super.init(BP384r1.name, BP384r1.p, BP384r1.a, BP384r1.b, BP384r1.gx, BP384r1.gy, BP384r1.order, BP384r1.cofactor, BP384r1.oid)
Expand All @@ -36,7 +36,7 @@ class BP384t1: DomainP {
static let gy = BInt("25ab056962d30651a114afd2755ad336747f93475b7a1fca3b88f2b6a208ccfe469408584dc2b2912675bf5b9e582928", radix: 16)!
static let order = BInt("8cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046565", radix: 16)!
static let cofactor = 1
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.12")
static let oid = ASN1ObjectIdentifier("1.3.36.3.3.2.8.1.1.12")!

init() {
super.init(BP384t1.name, BP384t1.p, BP384t1.a, BP384t1.b, BP384t1.gx, BP384t1.gy, BP384t1.order, BP384t1.cofactor, BP384t1.oid)
Expand Down
Loading

0 comments on commit af585f7

Please sign in to comment.