Crypto-Agility update: ECDSA, ML-DSA, SLH-DSA signature verification

Aberta
#80 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
php
Domínio
cryptography

Direção de pesquisa

The issue mentions metarefresh 1.3.1 and simpleSAMLphp 2.5.3.1 but no specific files. Start by locating the signature verification logic in the metarefresh module's PHP source, currently handling only RSA. Done means the ECDSA, ML-DSA and SLH-DSA metadata sources validate without the 'Could not validate signature' error.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Our federation publishes metadata with four algorithms simultaneously: RSA, ECDSA, ML-DSA, SLH-DSA (the latter two being PQC algorithms for future quantum readiness).

metarefresh currently appears to understand exclusively RSA, judging from the failing signature validation for the other three variants:

10:53:14.176Z [metarefresh]: Executing set [eduID-LU]
10:53:14.178Z [metarefresh]: In set [eduID-LU] loading source [http://www.eduid.lu/metadata/upstream-rsa.xml]
10:53:14.412Z Found 28 entities
10:53:22.006Z Writing: /export/hosting/restena/clueless/private/deploy-test/simplesamlphp-2.5.3.1/metadata/metadata-eduID-LU/saml20-sp-remote.php
10:53:23.210Z [metarefresh]: Executing set [eduID-LU-ECDSA]
10:53:23.228Z [metarefresh]: In set [eduID-LU-ECDSA] loading source [http://www.eduid.lu/metadata/upstream-ecdsa.xml]
10:53:23.428Z Could not validate signature
10:53:23.428Z Skipping "https://clueless.restena.lu/simplesaml_dev/saml2/idp/metadata.php" - could not verify signature using certificate.
[...]
10:53:23.440Z Found 28 entities
10:53:23.441Z [metarefresh]: Executing set [eduID-LU-MLDSA]
10:53:23.441Z [metarefresh]: In set [eduID-LU-MLDSA] loading source [http://www.eduid.lu/metadata/upstream-mldsa.xml]
10:53:23.593Z Could not validate signature
10:53:23.593Z Skipping "https://clueless.restena.lu/simplesaml_dev/saml2/idp/metadata.php" - could not verify signature using certificate.
[...]
10:53:23.607Z Found 28 entities
10:53:23.607Z [metarefresh]: Executing set [eduID-LU-SLHDSA]
10:53:23.608Z [metarefresh]: In set [eduID-LU-SLHDSA] loading source [http://www.eduid.lu/metadata/upstream-slhdsa.xml]
[...]
10:53:23.787Z Found 28 entities

The config points to the respective signing certificates as per config below. eduGAIN is able to validate these files with an independent implementation so the files and signing certs are known good.

This is happening on simpleSAMLphp 2.5.3.1 and metarefresh 1.3.1.

        'sets' => [

                'eduID-LU' => [
                        'cron'          => ['daily'],
                        'sources'       => [
                                [
                                        'types' => ['saml20-sp-remote'],
                                        'src' => 'http://www.eduid.lu/metadata/upstream-rsa.xml',
                                        'certificates' => [ 'eduID-rsa.pubcert', ]
                                ],
                        ],
                        'expireAfter'   => 60*60*24*365, // Maximum 365 days cache time.
                        'outputDir'     => 'metadata/metadata-eduID-LU/',
                        'outputFormat'  => 'flatfile',
                ],
                'eduID-LU-ECDSA' => [
                        'cron'          => ['daily'],
                        'sources'       => [
                                [
                                        'types' => ['saml20-sp-remote'],
                                        'src' => 'http://www.eduid.lu/metadata/upstream-ecdsa.xml',
                                        'certificates' => [ 'eduID-ecdsa.pubcert', ]
                                ],
                        ],
                        'expireAfter'   => 60*60*24*365, // Maximum 365 days cache time.
                        'outputDir'     => 'metadata/metadata-eduID-LU-ECDSA/',
                        'outputFormat'  => 'flatfile',
                ],
                'eduID-LU-MLDSA' => [
                        'cron'          => ['daily'],
                        'sources'       => [
                                [
                                        'types' => ['saml20-sp-remote'],
                                        'src' => 'http://www.eduid.lu/metadata/upstream-mldsa.xml',
                                        'certificates' => [ 'eduID-mldsa.pubcert', ]
                                ],
                        ],
                        'expireAfter'   => 60*60*24*365, // Maximum 365 days cache time.
                        'outputDir'     => 'metadata/metadata-eduID-LU-MLDSA/',
                        'outputFormat'  => 'flatfile',
                ],
                'eduID-LU-SLHDSA' => [
                        'cron'          => ['daily'],
                        'sources'       => [
                                [
                                        'types' => ['saml20-sp-remote'],
                                        'src' => 'http://www.eduid.lu/metadata/upstream-slhdsa.xml',
                                        'certificates' => [ 'eduID-slhdsa.pubcert', ]
                                ],
                        ],
                        'expireAfter'   => 60*60*24*365, // Maximum 365 days cache time.
                        'outputDir'     => 'metadata/metadata-eduID-LU-SLHDSA/',
                        'outputFormat'  => 'flatfile',
                ],
Linguagem predominante
PHP
Estrelas
9
Forks
19
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de simplesamlphp/simplesamlphp-module-metarefresh

Todas as issues de simplesamlphp/simplesamlphp-module-metarefresh

Issues semelhantes

Mais issues de PHP

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.