Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

use rsa.PSSSaltLengthEqualsHash to match rfc #232

Merged
merged 1 commit into from
May 14, 2019
Merged

use rsa.PSSSaltLengthEqualsHash to match rfc #232

merged 1 commit into from
May 14, 2019

Conversation

partkyle
Copy link
Contributor

Based on RFC 3447, and other discussions around RSAPSS: the salt length should match the size of the algorithm used for signing the token.

This change will cause existing implementations of the go-jose library to generate new tokens with a salt length matching the chosen hash library, but still allow it to detect the hash size in existing tokens.

Here is a link to another go library with a similar library: dgrijalva/jwt-go#285

Here is a reference to another go library
See a python implementation for a similar example: https://github.com/jpadilla/pyjwt/blob/d25c92ca5e9980ca7bc8b31420bf36e3f4a9e3f0/jwt/algorithms.py#L385

@CLAassistant
Copy link

CLAassistant commented May 13, 2019

CLA assistant check
All committers have signed the CLA.

@csstaub
Copy link
Collaborator

csstaub commented May 14, 2019

Looks good to me. Thank you for your contribution @partkyle!

@csstaub csstaub merged commit 380c0b0 into square:v2 May 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants