Skip to content

Commit 8837fe9

Browse files
committed
add discussion of IEEE EC Signture format
1 parent f815be9 commit 8837fe9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/ec.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ Signatures have two components - **r** and **s**. How these two components are c
142142

143143
SSH2-formatted signatures employee the format discussed in [RFC4253](https://tools.ietf.org/html/rfc4253#page-15) or (for Ed25519) [draft-ietf-curdle-ssh-ed25519-02](https://tools.ietf.org/html/draft-ietf-curdle-ssh-ed25519-02#section-6).
144144

145+
### IEEE
146+
147+
This format used with [JSON Web Signatures](https://en.wikipedia.org/wiki/JSON_Web_Signature) (JWS), JavaScript's [Web Cryptography API](https://en.wikipedia.org/wiki/Web_Cryptography_API), et al. [SubtleCrypto: sign() method - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/sign#ecdsa) explains why IEEE is used as the name:
148+
149+
> This encoding was also proposed by the [IEEE 1363-2000](https://standards.ieee.org/ieee/1363/2049/) standard, and is sometimes referred to as the IEEE P1363 format. It differs from the [X.509](https://www.itu.int/rec/T-REC-X.509) signature structure, which is the default format produced by some tools and libraries such as [OpenSSL](https://www.openssl.org/).
150+
151+
In the case of JSON Web Signatures the signature should also be passed through `\phpseclib3\Common\Functions\Strings::base64url_encode()`.
152+
153+
<!-- see also https://datatracker.ietf.org/doc/html/rfc7515#page-45 -->
154+
145155
### Raw
146156

147157
Returns an array with **r** and **s** as keys.

0 commit comments

Comments
 (0)