Comments (2)
This library treats private keys as normal Ruby integers, so if you can figure out how to extract the actual integer value of your private key then you would be able to use it with this library. I don't know how to do that at the moment, but there is probably a way to do it using Ruby's OpenSSL bindings.
from ruby_ecdsa.
It's quite easy (granted, all the lifting is provided by OpenSSL
pem_private_key = File.read(private_key_path)
ec_private_key = OpenSSL::PKey::EC.new(pem_private_key)
int_private_key = ec_private_key.private_key.to_i
The int_private_key
can then be plugged into ECDSA::sign
from ruby_ecdsa.
Related Issues (12)
- The binary decode methods should not be sensitive to the string encoding
- NIST vs SECP HOT 2
- Single public key hex string HOT 1
- sqr_qnr.pdf HOT 1
- Broken links to secg.org
- The Point class needs a #hash method
- Fix the limitations on taking square roots HOT 1
- SEC2-v2 defines "partially valid" and "valid" public key
- Is it possible to use a private key from file HOT 1
- Slow Performance... HOT 13
- are the y-points correct? problems validating ietf-cose-msg examples HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby_ecdsa.