sajjon / ellipticcurvekit Goto Github PK
View Code? Open in Web Editor NEWElliptic Curve Cryptography in Pure Swift
License: Apache License 2.0
Elliptic Curve Cryptography in Pure Swift
License: Apache License 2.0
Hello!
I see the minimum supported iOS version 11.2 in the .podspec
file. Why? 🤔
Because our project needs to support iOS 10.0.
English is not my native language; please excuse typing errors.
let message = Message(hex: "243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89"
An error occurred:
Cannot invoke initializer for type 'Message' with an argument list of type '(hex: String)'
Hi, I'm still using your library for my project and it works great, the the app which I'm porting from Android to iOS is communicating with a 3rd Party endpoint and in one of the recent updates they switched from Secp256K1 to Secp521R1. Do you have plans to add this curve Algo?
Hi~
Method processing takes a long time.
It always takes over 3 seconds to run ( restoreKeyPairFrom, verify method )
I would like to know release optimization Config info.
my Xcode build Settings.
Do you have any more settings info?
Hello!
Your lib perfectly matches to my goals, but I have trouble with Message from your example:
let message = Message(hex: "243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89" An error occurred: Cannot invoke initializer for type 'Message' with an argument list of type '(hex: String)'
How could I init Message with some String?
Hi,
I'm currently porting my Android app to iOS and I stumbled across your library which seems to perfectly meet my requirements. I'm not sure if I do something wrong but I'm not able to create a public key from Data. I have created a Unit test to check if the output of some crypto functions is the same as in my Android app. Therefore I use following uncompressed public key. Below the uncompressed public key in hex representation
04F40AF135A4889436CEE52B5C73A33EC5AD0BE0952F57F4F0ED0C80B0BEDA7CA643789393A5947E9FAA3F6795C9AA09A96325DFE850BFC3F1DB62A50ABFB0FFF7
Once converted the hex string to Data I use following function calls
let decodedFromUncompressed = try AffinePoint<Secp256k1>.init(data: publicKeyBytes)
return PublicKey<Secp256k1>.init(point: decodedFromUncompressed)
This leads to an error here
Upon further investigation I saw that the call
let yData = y.as256bitLongData()
returned 0 despite the value is not 0. It seems the as256bitLongData uses internally a function called asHexStringLength64 which returns following strange hex value
0-789393A5947E9FAA3F6795C9AA09A96325DFE850BFC3F1DB62A50ABFB0FFF7
The function fills up the missing values with 0 but seems to ignore the '-' sign. Is this the root cause of the error, did I misunderstand something or is there another way to get a PublicKey from uncompressed Data?
I just need to use pk to verify, but there are only recover keypair function to verify
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.