RSA implementation in pure Rust

Related tags

Authentication RSA
Overview

RSA

crates.io Documentation Build Status minimum rustc 1.51 Project Chat dependency status

A portable RSA implementation in pure Rust.

⚠️ WARNING: This crate has been audited by a 3rd party, but a full blog post with the results and the updates made since the audit has not been officially released yet. See #60 for more information.

Example

use rsa::{PublicKey, RsaPrivateKey, RsaPublicKey, PaddingScheme};
use rand::rngs::OsRng;

let mut rng = OsRng;
let bits = 2048;
let priv_key = RsaPrivateKey::new(&mut rng, bits).expect("failed to generate a key");
let pub_key = RsaPublicKey::from(&priv_key);

// Encrypt
let data = b"hello world";
let enc_data = pub_key.encrypt(&mut rng, PaddingScheme::new_pkcs1v15_encrypt(), &data[..]).expect("failed to encrypt");
assert_ne!(&data[..], &enc_data[..]);

// Decrypt
let dec_data = priv_key.decrypt(PaddingScheme::new_pkcs1v15_encrypt(), &enc_data).expect("failed to decrypt");
assert_eq!(&data[..], &dec_data[..]);

Note: If you encounter unusually slow key generation time while using RsaPrivateKey::new you can try to compile in release mode or add the following to your Cargo.toml. Key generation is much faster when building with higher optimization levels, but this will increase the compile time a bit.

[profile.debug]
opt-level = 3

If you don't want to turn on optimizations for all dependencies, you can only optimize the num-bigint-dig dependency. This should give most of the speedups.

[profile.dev.package.num-bigint-dig]
opt-level = 3

Status

Currently at Phase 1 (v) 🚧

There will be three phases before 1.0 🚢 can be released.

  1. 🚧 Make it work
    • Prime generation
    • Key generation
    • PKCS1v1.5: Encryption & Decryption
    • PKCS1v1.5: Sign & Verify
    • PKCS1v1.5 (session key): Encryption & Decryption
    • OAEP: Encryption & Decryption
    • PSS: Sign & Verify
    • Key import & export
  2. 🚀 Make it fast
    • Benchmarks
    • compare to other implementations 🚧
    • optimize 🚧
  3. 🔐 Make it secure
    • Fuzz testing
    • Security Audits

Minimum Supported Rust Version (MSRV)

All crates in this repository support Rust 1.51 or higher. In future minimally supported version of Rust can be changed, but it will be done with a minor version bump.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Comments
  • New API design

    New API design

    Prompted by https://github.com/RustCrypto/signatures/issues/25#issuecomment-525248346 and my desire to get #18 and #26 merged :smile:

    The main design difference compared to the current traits is that instead of making the "padding scheme" a parameter of the pubkey sign/verify functions, we make each scheme a first-class primitive that wraps the common public or private key. It needs to be an explicit choice by the user anyway.

    Current draft proposal (as of 2020-03-07) (without changes to the signature crate, and without handling the encryption cases):

    // This module has been merged into master
    mod raw {
        pub trait EncryptionPrimitive {
            /// Do NOT use directly! Only for implementors.
            fn raw_encryption_primitive(&self, plaintext: &[u8]) -> Result<Vec<u8>>;
        }
    
        pub trait DecryptionPrimitive {
            /// Do NOT use directly! Only for implementors.
            fn raw_decryption_primitive<R: Rng>(
                &self,
                rng: Option<&mut R>,
                ciphertext: &[u8],
            ) -> Result<Vec<u8>>;
        }
    }
    
    mod key {
        pub trait PublicKeyParts {
            /// Returns the modulus of the key.
            fn n(&self) -> &BigUint;
            /// Returns the public exponent of the key.
            fn e(&self) -> &BigUint;
            /// Returns the modulus size in bytes. Raw signatures and ciphertexts for
            /// or by this public key will have the same size.
            fn size(&self) -> usize {
                (self.n().bits() + 7) / 8
            }
        }
    
        pub trait PrivateKey: crate::raw::DecryptionPrimitive + PublicKeyParts {
            /// Could have functions like this for usability?
            pub fn sign_pkcs1v15(&self) -> crate::pkcs1v15::Signer;
            pub fn sign_pkcs1v15_blinded<R: Rng>(&self, rng: R) -> crate::pkcs1v15::Signer;
            pub fn sign_pss(&self) -> crate::pss::Signer;
            pub fn sign_pss_blinded(&self) -> crate::pss::Signer;
        }
    
        pub trait PublicKey: crate::raw::EncryptionPrimitive + PublicKeyParts {
            /// Could have functions like this for usability?
            pub fn verify_pkcs1v15(&self) -> crate::pkcs1v15::Verifier;
            pub fn verify_pss(&self) -> crate::pss::Verifier;
        }
    
        pub struct RSAPrivateKey { ... }
    
        impl crate::raw::DecryptionPrimitive for RSAPrivateKey { ... }
    
        impl PublicKeyParts for RSAPrivateKey { ... }
    
        impl PrivateKey for RSAPrivateKey {
            pub fn sign_pkcs1v15(&self) -> crate::pkcs1v15::Signer {
                crate::pkcs1v15::Signer::unblinded(self)
            }
    
            pub fn sign_pkcs1v15_blinded<R: Rng>(&self, rng: R) -> crate::pkcs1v15::Signer {
                crate::pkcs1v15::Signer::blinded(rng, self)
            }
    
            pub fn sign_pss(&self) -> crate::pss::Signer {
                crate::pss::Signer::unblinded(self)
            }
    
            pub fn sign_pss_blinded(&self) -> crate::pss::Signer {
                crate::pss::Signer::blinded(self)
            }
        }
    
        pub struct RSAPublicKey { ... }
    
        impl crate::raw::EncryptionPrimitive for RSAPublicKey { ... }
    
        impl PublicKeyParts for RSAPublicKey { ... }
    
        impl PublicKey for RSAPublicKey {
            pub fn verify_pkcs1v15(&self) -> crate::pkcs1v15::Verifier {
                crate::pkcs1v15::Verifier::new(self)
            }
    
            pub fn verify_pss(&self) -> crate::pss::Verifier {
                crate::pss::Verifier::new(self)
            }
        }
    }
    
    /// PKCS#1 v1.5 signing (and encryption?)
    mod pkcs1v15 {
        use signature::Error;
    
        use crate::{
            key::{PrivateKey, PublicKey},
            raw::DecryptionPrimitive,
        };
    
        pub struct Signature {
            bytes: Vec<u8>,
        }
    
        impl signature::Signature for Signature {
            fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error> {
                // Parse a PKCS#1 v1.5 signature here non-contextually
                // (i.e. length can't be verified as we don't know n)
            }
        }
    
        // Technically all we need is K: DecryptionPrimitive, but PrivateKey
        // is the correct user-level encapsulation, and we should keep
        // DecryptionPrimitive internal as much as possible.
        pub struct Signer<'a, R: Rng, K: PrivateKey> {
            // RefCell in lieu of a stateful or randomizable signature trait
            rng: Option<RefCell<R>>,
            priv_key: &'a K,
        }
    
        impl<'a, R: Rng, K: PrivateKey> Signer<'a, R, K> {
            pub fn unblinded(priv_key: &'a K) -> Self {
                Signer { rng: None, priv_key }
            }
    
            pub fn blinded(rng: R, priv_key: &'a K) -> Self {
                Signer { rng: Some(RefCell::new(rng)), priv_key }
            }
        }
    
        impl<'a, R: Rng, K: PrivateKey> signature::Signer<Signature> for Signer<'a, R, K> {
            fn try_sign(&self, msg: &[u8]) -> Result<Signature, Error> {
                // Sign the message directly (equivalent to current None case)
            }
        }
    
        impl<'a, R: Rng, K: PrivateKey> signature::DigestSigner<D: Digest, Signature> for Signer<'a, R, K> {
            fn try_sign_digest(&self, digest: D) -> Result<Signature, Error> {
                // Sign the digest (equivalent to current Some(Hash) case)
            }
        }
    
        pub struct Verifier<'a, PK: PublicKey> {
            pub_key: &'a PK,
        }
    
        impl<'a, PK: PublicKey> Verifier<'a, PK> {
            pub fn new(pub_key: &'a PK) -> Self {
                Verifier { pub_key }
            }
        }
    
        impl<'a, PK: PublicKey> signature::Verifier<Signature> for Verifier<'a, PK> {
            fn verify(&self, msg: &[u8], signature: &Signature) -> Result<(), Error> {
                // Verify the message directly (equivalent to current None case)
            }
        }
    
        impl<'a, PK: PublicKey> signature::DigestVerifier<D: Digest, Signature> for Verifier<'a, PK> {
            fn verify_digest(&self, digest: D, signature: &Signature) -> Result<(), Error> {
                // Verify the digest (equivalent to current Some(Hash) case)
            }
        }
    }
    
    /// PSS signing
    mod pss {
        use signature::Error;
    
        use crate::{
            key::{PrivateKey, PublicKey},
            raw::DecryptionPrimitive,
        };
    
        pub struct Signature {
            bytes: Vec<u8>,
        }
    
        impl signature::Signature for Signature {
            fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error> {
                // Parse a PSS signature here non-contextually
                // (i.e. length can't be verified as we don't know n)
            }
        }
    
        pub struct Signer<'a, R: Rng, K: PrivateKey> {
            // RefCell in lieu of a stateful or randomizable signature trait
            rng: RefCell<R>,
            priv_key: &'a K,
            salt_len: Option<usize>,
            blind: bool
        }
    
        impl<'a, R: Rng, K: PrivateKey> Signer<'a, R, K> {
            pub fn unblinded(rng: R, priv_key: &'a K, salt_len: Option<usize>) -> Self {
                Signer { rng: RefCell::new(rng), priv_key, salt_len, blind: false }
            }
    
            pub fn blinded(rng: R, priv_key: &'a K, salt_len: Option<usize>) -> Self {
                Signer { rng: RefCell::new(rng), priv_key, salt_len, blind: true }
            }
        }
    
        impl<'a, R: Rng, K: PrivateKey> signature::DigestSigner<D: Digest, Signature> for Signer<'a, R, K> {
            fn try_sign_digest(&self, digest: D) -> Result<Signature, Error> { ... }
        }
    
        pub struct Verifier<'a, PK: PublicKey> {
            pub_key: &'a PK,
        }
    
        impl<'a, PK: PublicKey> Verifier<'a, PK> {
            pub fn new(pub_key: &'a PK) -> Self {
                Verifier { pub_key }
            }
        }
    
        impl<'a, PK: PublicKey> signature::DigestVerifier<D: Digest, Signature> for Verifier<'a, PK> {
            fn verify_digest(&self, digest: D, signature: &Signature) -> Result<(), Error> { ... }
        }
    }
    
    // Do these improve usability?
    pub use pkcs1v15::{
        Signature as Pkcs1v15Signature,
        Signer as Pkcs1v15Signer,
        Verifier as Pkcs1v15Verifier,
    };
    pub use pss::{
        Signature as PssSignature,
        Signer as PssSigner,
        Verifier as PssVerifier,
    };
    

    I'll update the proposal in this post as we discuss it.

    discussion api 
    opened by str4d 40
  • Implement Signer/Verifier/Signature interfaces for the RSA signatures

    Implement Signer/Verifier/Signature interfaces for the RSA signatures

    Refactor the rsa crate to use the API defined by the signature crate. This adds pss and pkcs1v15 modules, each of them providing Signature, Verifier and Signer/RandomizedSigner implementations.

    opened by lumag 24
  • feat: nostd, core+alloc support

    feat: nostd, core+alloc support

    Blocked on https://github.com/dignifiedquire/num-bigint/pull/12

    Missing: docs, tests and a way to avoid having base64 break our builds to rust-lang/cargo#4866.

    opened by roblabla 21
  • Add `rdrand` feature to getrandom dependencies

    Add `rdrand` feature to getrandom dependencies

    Hi,

    At first, thanks for this awesome library !

    I'm trying to build rsa for the x86_64-unknown-uefi target, so in no_std environement.

    After fixing the bug #138 by upgrading num-bigint-dig to 0.8.1 (btw you guys might want to fix that too). I'm getting an error from building getrandom (which is called from rand) as it doesn't support my target.

    The fix is to enable the rdrand feature from getrandom.

    I tried messing with rsa's Cargo.toml but I couldn't achieve to make it work.

    I hoped you guys can help me.

    EDIT: I just the saw the num-bigint-dig upgrade in a current PR

    opened by sven-eliasen 19
  • Update RSA signature traits implementations

    Update RSA signature traits implementations

    • [X] Change Signer/Verifier implementations to accept raw messages rather than pre-hashed data
    • [X] Implement DigestSigner/Verifier traits
    • [x] Get rid of DynDigest bounds for the RSASSA-PSS implmentation
    • [x] Sort out specifying Hash to the pkcs1v15::SigningKey<D>::new_with_hash, which duplicates information passed in <D>
    • [ ] ~~Use passed digest object for PSS calculations rather than newly created Digest?~~
    opened by lumag 16
  • feat: switch to version 2.0 (pre) of the  signature crate

    feat: switch to version 2.0 (pre) of the signature crate

    Rework the crate to implement traits from the preview of the signature crate. Use Vec as Self::Repr type.

    Note: I'm yet to see how will this impact the code in my projects. But for the evaluation I'd first need ecdsa / p384 to be updated.

    cc @tarcieri @dignifiedquire

    opened by lumag 12
  • RsaPublicKey::from_public_key_pem crashing when using more than 4096 bits

    RsaPublicKey::from_public_key_pem crashing when using more than 4096 bits

    Generating a private key with more than 4096 bits using RsaPrivateKey::new and deriving a public key from it works fine, however when trying to read the same key from a string using RsaPublicKey::from_public_key_pem, the lib panics if the key uses more than 4096 bits, it works fine with 4096 or less, jumping to 4097 makes it panic.

    opened by PaulDotSH 12
  • Add OAEP Encryption & Decryption

    Add OAEP Encryption & Decryption

    Add OAEP encryption and decryption to RSA. Go's crypto module was a source of inspiration.

    Since I am a Rustlang newbie, it probably cannot be merged as it is.

    Here are important changes:

    1. An oaep module has been added and made public (see 3 for the reason)
    2. Hashes enum now has a digest function for most of enum's elements. Thus the import of sha-1,sha2 and sha3 crates
    3. Keys now supports oaep encrypt/decrypt but only with default options (options cannot be changed) which are a sha1 digest and empty label
    4. OAEP encode/decode options are the hash function (well Hashes instance) and a label. The hash function for the label and OAEP mask generation function cannot be chosen independently
    opened by lucdew 10
  • Use `pkcs1` and `pkcs8` crates; MSRV 1.51+

    Use `pkcs1` and `pkcs8` crates; MSRV 1.51+

    Closes #75

    Switches the rsa crate to use the pkcs1 and pkcs8 crates from https://github.com/rustcrypto/utils

    Rationale

    • Interoperability: PKCS#8 in particular is algorithm agnostic, and the pkcs8 crate provides the following traits which can be used to abstract over the algorithm used by a particular key (NOTE: this PR does not yet impl these traits, but probably should)
    • Security: an upcoming ACM CCS paper claims to be able to extract RSA private keys from SGX using PEM parsing sidechannels alone. The new pem-rfc7468 crate implements a constant time PEM parser which leverages the base64ct crate for constant-time encoding/decoding.
    • Parsimony: by switching to crates from https://github.com/rustcrypto/utils a user of the rsa crate who is also leveraging any of RustCrypto's elliptic curve crates such as p256, p384, or k256 will have fewer overall dependencies.
    • PKCS#8 Encryption: the pkcs8 crate has support for ENCRYPTED PRIVATE KEYs using the pkcs5 crate. With this it can encrypt any PKCS#8 key under a password with scrypt-based key derivation and AES-CBC encryption (unfortunately PKCS#8 has no support for AEADs, alas)

    Notes

    This is the first time I've attempted to use the pkcs1 crate as it's brand new, so this integration is effectively taking it out for a test drive.

    One of the key parts of format encoding/decoding with RSA when implementing PKCS#1 and PKCS#8 is that the latter is effectively a wrapper for the former in modern use. So therefore it seems like there should be a first-class integration between the pkcs1 and pkcs8 crates, namely I think the pkcs1 crate should support an optional dependency on pkcs8.

    While the pkcs8 crate has some nice traits like the aforementioned FromPrivateKey/ToPrivateKey, the pkcs1 crate does not. The rsa crate defines some traits for this (e.g. PrivateKeyEncoding, PrivateKeyPemEncoding) but I really feel like the traits should get hoisted up into the pkcs1 crate.

    If that were to happen, I think that the integration with the rsa crate could just be for PKCS#1 DER encoding/decoding. Concerns like PKCS#8 and PEM could be hoisted up into traits defined by the pkcs1 crate.

    opened by tarcieri 9
  • Add possibility to allow a different hash function for MGF mask function

    Add possibility to allow a different hash function for MGF mask function

    This pull request adds a new field to the OAEP padding to allow for a different hash function for the MGF mask function. This is especially needed, when trying to be compatible with other algorithms, more specifically the AndroidKeyStore. The AndroidKeyStore only supports RSA encryption with SHA256 and SHA1 for the MGF mask function.

    For compatibility the existing functions were adjusted to replicate the previous behaviour to use the same hash function.

    To the OAEP-Padding two new functions new_oaep_with_mgf_hash and new_oaep_with_mgf_hash_with_labe were added to allow specifying the MGF hash function.

    opened by ubamrein 9
  • add NULL parameter to AlgorithmIdentifier of encoded keys

    add NULL parameter to AlgorithmIdentifier of encoded keys

    as per the RFC 8017 [1], the NULL parameter MUST be present if the OID in AlgorithmIdentifier is rsaEncryption. this commit adds an explicit NULL to the AlgorithmIdentifier so that RSA keys encoded by this crate are compliant to the RFC:

    The object identifier rsaEncryption identifies RSA public and private keys as defined in Appendices A.1.1 and A.1.2. The parameters field has associated with this OID in a value of type AlgorithmIdentifier SHALL have a value of type NULL.

    [1] https://tools.ietf.org/html/rfc8017#appendix-A

    fixes #91

    opened by clenimar 9
  • feat: drop old signing/verification API

    feat: drop old signing/verification API

    The signing and verification is now implemented using the generic Signature and *Signer / *Verifier traits. Drop old API proprietary to the RSA crate.

    Signed-off-by: Dmitry Baryshkov [email protected]

    opened by lumag 0
  • Refactor `PaddingScheme` into a trait

    Refactor `PaddingScheme` into a trait

    As proposed in #226, splits up the PaddingScheme enum into four structs, named after the previous variants of the struct (adopting capitalization from the Rust API guidelines):

    • oaep::Oaep
    • pkcs1v15::{Pkcs1v15Encrypt, Pkcs1v15Sign}
    • pss::Pss

    All of these are re-exported from the toplevel.

    Each of these structs impls one or more of the following traits:

    • PaddingScheme: used for encryption
    • SignatureScheme: used for signing

    The PaddingScheme constructors have been remapped as follows:

    • new_oaep => Oaep::new
    • new_oaep_with_label => Oaep::new_with_label
    • new_oaep_with_mgf_hash => Oaep::new_with_mgf_hash
    • new_oaep_with_mgf_hash_with_label => Oaep::new_with_mgf_hash_and_label
    • new_pkcs1v15_encrypt => Pkcs1v15Encrypt
    • new_pkcs1v15_sign => Pkcs1v15Sign::new
    • new_pkcs1v15_sign_raw => Pkcs1v15Sign::new_raw
    • new_pss => Pss::{new, new_blinded}
    • new_pss_with_salt => Pss::{new_with_salt new_blinded_with_salt}
    opened by tarcieri 3
  • Unable to verify PSS signature generated by openssl

    Unable to verify PSS signature generated by openssl

    Hi, I have created an RSA key pair, and imported to openssl:

    use openssl::pkey::PKey;
    let pkey = PKey::private_key_from_der(private_key_der.as_bytes()).unwrap();
    let mut signer = OpensslSigner::new(MessageDigest::sha256(), &pkey).unwrap();
    signer.set_rsa_padding(openssl::rsa::Padding::PKCS1_PSS).unwrap();
    signer.set_rsa_pss_saltlen(RsaPssSaltlen::custom(32)).unwrap();
    signer.update(&data).unwrap();
    let signature = signer.sign_to_vec().unwrap();
    

    I can verify the signature with openssl:

    use openssl::hash::MessageDigest;
    use openssl::sign::{RsaPssSaltlen, Verifier};
    
    let mut verifier = Verifier::new(MessageDigest::sha256(), &pkey).unwrap();
    verifier.set_rsa_padding(openssl::rsa::Padding::PKCS1_PSS).unwrap();
    verifier.set_rsa_pss_saltlen(RsaPssSaltlen::custom(32)).unwrap();
    verifier.update(&message).unwrap();
    verifier.verify(&signature)
    

    But I can not verify the signature with rsa::pss and vice versa.

    opened by zhaomengru2015 2
  • Confusion over `pkcs1v15::VerifyingKey::new` vs `::new_with_prefix`

    Confusion over `pkcs1v15::VerifyingKey::new` vs `::new_with_prefix`

    In #234 we had some people confused about signature verification failing with ::new, and they had trouble discovering ::new_with_prefix.

    It would be good to either improve the documentation here, or eliminate the distinction between ::new and ::new_with_prefix and automatically determining if the prefix is needed (e.g. based on the OID of the provided digest).

    It seems like other RSA libraries are able to make this determination automatically.

    enhancement discussion api 
    opened by tarcieri 2
  • Dependency on `subtle` with BSD 3-clause license

    Dependency on `subtle` with BSD 3-clause license

    I am working on a project that has a policy to avoid BSD 2- and 3-clause licenses due to the complexity of satisfying the attribution clause:

    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

    The rsa crate directly has great license options, but, it has a dependency on subtle which is licensed under BSD 3-clause license. See https://github.com/dalek-cryptography/subtle/issues/92. But it seems this project is stalled—see subtle-ng.

    Is there any possibility of doing a substitution of this dependency with some other crate with different licensing? (subtle-ng also is BSD 3-clause licensed currently.)

    opened by cmcqueen 6
Owner
Rust Crypto
Cryptographic algorithms written in pure Rust
Rust Crypto
OpenSK is an open-source implementation for security keys written in Rust that supports both FIDO U2F and FIDO2 standards.

OpenSK This repository contains a Rust implementation of a FIDO2 authenticator. We developed this as a Tock OS application and it has been successfull

Google 2.4k Jan 2, 2023
ROCCA cipher implementation for Rust.

ROCCA for Rust This is a Rust implementation of the ROCCA authenticated cipher, ported from the Zig implementation. ROCCA is key committing, has a 256

Frank Denis 6 Sep 30, 2022
SD-JWT Rust Reference Implementation

SD-JWT Rust Reference Implementation This is the reference implementation of the IETF SD-JWT specification written in Rust. Supported version: 6. Note

OpenWallet Foundation Labs 4 Dec 19, 2023
An oauth2 client implementation providing the Device, Installed and Service Account flows.

yup-oauth2 is a utility library which implements several OAuth 2.0 flows. It's mainly used by google-apis-rs, to authenticate against Google services.

Lewin Bormann 174 Dec 30, 2022
An implementation for an authentication API for Rocket applications.

rocket_auth rocket_auth provides a ready-to-use backend agnostic API for authentication management. For more information visit the documentation at ht

null 62 Dec 19, 2022
An implementation of webauthn components for Rustlang servers

Webauthn-rs Webauthn is a modern approach to hardware based authentication, consisting of a user with an authenticator device, a browser or client tha

Kanidm 232 Jan 8, 2023
A minimal jwt implementation for OIDC

Compact JWT Json Web Tokens (JWT) are a popular method for creating signed transparent tokens that can be verified by clients and servers. They are en

Kanidm 4 Dec 29, 2021
WebCipher - JWT encryption/decryption algorithms + a JWK Store implementation

webcipher provides JWT authentication utilities and storage mechanism for caching keys and optimizing decryption/encryption processes.

Wavy 1 May 1, 2022
JWT lib in rust

jsonwebtoken API documentation on docs.rs See JSON Web Tokens for more information on what JSON Web Tokens are. Installation Add the following to Carg

Vincent Prouillet 1.1k Jan 3, 2023
Example application using a Vue frontend with Rust backend that has authentication + authorization.

This project contains a Rust server that serves a single page application and has authentication + JWT-based authorization.

null 43 Dec 9, 2022
Authorization Server with Rust using Tonic

authorization-server Authorization Server with Rust using Tonic. Function implemented User registration and profile store Change password Login Token

sora 3 Oct 5, 2021
Extensible, strongly-typed Rust OAuth2 client library

OAuth2 An extensible, strongly-typed implementation of OAuth2 (RFC 6749). Documentation is available on docs.rs. Release notes are available on GitHub

David Ramos 602 Dec 25, 2022
An auth system/library for Rust applications

Rust : Forbidden (WIP) An experimental auth library for Rust applications. Goals This crate is to define a common set of traits and idioms to provide

Mario Montoya 9 Nov 8, 2022
Authenticate to Minecraft using the Microsoft Authentication Scheme from Rust.

Authenticating to Minecraft with the Microsoft Authentication Scheme from Rust This program showcases an implementation of the microsoft authenticatio

ALinuxPerson 17 Dec 22, 2022
Rust library for HTTP authentication. Parses challenge lists, responds to Basic and Digest challenges. Likely to be extended with server support and additional auth schemes.

Rust library for HTTP authentication. Parses challenge lists, responds to Basic and Digest challenges. Likely to be extended with server support and a

Scott Lamb 3 Jun 10, 2022
Fast, simple and REST compliant file-server with public/private key authentication written in Rust

stormi Stormi is a fast and simple file-server with public/private key authentication How does it work? Stormi accepts multipart/form-data form with m

Polygon 2 Dec 8, 2022
🔥 Firebase authentication for Rust 🦀

Fire Auth Rust wrapper for Firebase Authentication REST API Installation Add the following to Cargo.toml: fireauth = "0.1.5" How to use First you need

UwU 11 Nov 12, 2022
Tools for manipulating JSON Web Tokens, JWS, JWE, and JWK in Rust

Rusty JWT Tools A collection of JWT utilities. This repository is part of the source code of Wire. You can find more information at wire.com or by con

Wire Swiss GmbH 4 Nov 22, 2022
Xbox live authentication flow for Minecraft with Rust.

MC Auth Xbox live authentication flow for Minecraft in Rust. Why? In order to create tools for Minecraft based on rust that implement the user profile

Minecraft Rust 3 Jan 15, 2023