> For the complete documentation index, see [llms.txt](https://web-token.spomky-labs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://web-token.spomky-labs.com/v3.0-1/the-components/signed-tokens-jws/signature-algorithms.md).

# Signature Algorithms

This framework comes with several signature algorithms. These algorithms are in the following namespace: `Jose\Component\Signature\Algorithm`.

| Algorithm                                   | Description                                        | Package                                   |
| ------------------------------------------- | -------------------------------------------------- | ----------------------------------------- |
| <p>HS256</p><p>HS384</p><p>HS512</p>        | HMAC with SHA-2 Functions                          | `web-token/jwt-signature-algorithm-hmac`  |
| <p></p><p>ES256</p><p>ES384</p><p>ES512</p> | Elliptic Curve Digital Signature Algorithm (ECDSA) | `web-token/jwt-signature-algorithm-ecdsa` |
| <p>RS256</p><p>RS384</p><p>RS512</p>        | RSASSA-PKCS1 v1\_5                                 | `web-token/jwt-signature-algorithm-rsa`   |
| <p>PS256</p><p>PS384</p><p>PS512</p>        | RSASSA-PSS                                         | `web-token/jwt-signature-algorithm-rsa`   |
| EdDSA (*only with the* Ed25519 *curve*)     | Edwards-curve Digital Signature Algorithm (EdDSA)  | `web-token/jwt-signature-algorithm-eddsa` |
| none                                        |                                                    | `web-token/jwt-signature-algorithm-none`  |

**The following signature algorithms are experimental and must not be used in production unless you know what you are doing. They are proposed for testing purpose only.**

**They are provided throught the package** `web-token/jwt-signature-algorithm-experimental`.

| Algorithm | Description                                    |
| --------- | ---------------------------------------------- |
| RS1       | RSASSA-PKCS1 v1\_5 with SHA-1 hashing function |
| HS1       | HMAC with SHA-1 hashing function               |
| ES256K    | Elliptic curve secp256k1 support               |

## How To Use

These algorithms have to be used with the [Algorithm Manager](/v3.0-1/the-components/algorithm-management-jwa.md). They do not need any arguments.

Example:

```php
<?php

use Jose\Component\Core\AlgorithmManager;
use Jose\Component\Signature\Algorithm\PS256;
use Jose\Component\Signature\Algorithm\ES512;
use Jose\Component\Signature\Algorithm\None;

$algorithm_manager = new AlgorithmManager([
    new PS256(),
    new ES512(),
    new None(),
]);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://web-token.spomky-labs.com/v3.0-1/the-components/signed-tokens-jws/signature-algorithms.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
