nerves-hub / nerves_key Goto Github PK
View Code? Open in Web Editor NEWNervesKey info and support for Elixir
License: Apache License 2.0
NervesKey info and support for Elixir
License: Apache License 2.0
Both https://shop.nitrokey.com/shop/product/nk-hsm-2-nitrokey-hsm-2-7 and https://github.com/opendnssec/SoftHSMv2 should be usable with nerves.
Usecase: instead of using nerveskey, once should be able to use a standard HSM module to act as a certificate authority and to sign keys.
I'm not sure of the status of this. Apologies if this is the wrong place.
It's confusing to find out via a crash deep in OTP about the certificates being invalid.
I'm trying the Udoo bolt as a nerves platform.
Thoughts on
iot-hsm.pdf being compatible with this code.
The UDOO bolt has a grove connector and it's possible to go from grove to qwiic.
are there any plans to adapt ATECC608B for nerves-key?
https://www.microchip.com/wwwproducts/ProductCompare/ATECC608A/ATECC608B
Currently signatures are returned as raw bits. It's also common to need DER-encoded signatures. These are a few bytes longer, and it can be confusing since other APIs often assume one or the other without going into the details. It would be nice to have better documentation in this area and a helper function to return the DER-encoded version.
Here's some code from https://gist.githubusercontent.com/voltone/d3c0bb3ee821703f52d439e00262cb88/raw/e90117c60dceb07f3a674cbf5102ef6f2722e0c8/ecdsa_signature.ex:
defmodule ECDSASignature do
require Record
Record.defrecord(
:ecdsa_signature,
:"ECDSA-Sig-Value",
Record.extract(:"ECDSA-Sig-Value", from_lib: "public_key/include/OTP-PUB-KEY.hrl")
)
def new(r, s) when is_integer(r) and is_integer(s) do
ecdsa_signature(r: r, s: s)
end
def new(raw) when is_binary(raw) do
size = raw |> byte_size() |> div(2)
<<r::size(size)-unit(8), s::size(size)-unit(8)>> = raw
new(r, s)
end
# Export to DER binary format, for use with :public_key.verify/4
def to_der(ecdsa_signature() = signature) do
:public_key.der_encode(:"ECDSA-Sig-Value", signature)
end
end
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.