Project

jwt-eddsa

0.0
The project is in a healthy, maintained state
Extends the ruby-jwt gem with EdDSA signing, verification and JWK importing/exporting
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

> 2.8.2
>= 0
 Project Readme

jwt-eddsa

Gem Version Build status

A library extending the ruby-jwt gem with EdDSA algorithms. Based on RFC 8037.

NOTE: This gem is still WIP

Work is currently done in ruby-jwt to allow extending the algorithms.

Plan is to replace rbnacl with something else in the near future.

Installation

Will only work with the WIP branch, so adding the following to your the Gemfile should do the trick:

gem "jwt", github: "anakinj/ruby-jwt", branch: "extendable-algos"
gem "jwt-eddsa"
require "jwt/eddsa" # not verified if this actually works

Usage

private_key = RbNaCl::Signatures::Ed25519::SigningKey.new("b" * 32)
token = JWT.encode({pay: "load"}, private_key, "EdDSA")
payload, header = JWT.decode(token, private_key.verify_key, true, algorithm: "EdDSA")

Development

bundle install
bundle exec rake

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/anakinj/jwt-eddsa. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

In this repository, pull request titles must follow the Conventional Commit specification to ensure clear and consistent communication of changes.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the jwt-eddsa project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.