Refactor key derivation code to be more explicit and testable

Aperta
#766 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c

Direzione di ricerca

Start by reading srtp_stream_init_keys and the related RTP/RTCP key-derivation paths. Identify applicable RFC test vectors and use them to check the function's output; the issue does not name specific test files. Done means key and salt are passed separately, input lengths are explicit, cipher compatibility is checked, and the result can be tested against those vectors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The function srtp_stream_init_keys has been the cause of several bugs, the latest being #763 / #765 . The code there uses heuristics to determine key lengths but there should be no need as this should be explicit for each cipher type.

Input key and salt length should be passed in to prevent reading out of bounds.
Key and Salt should be passed in separately.
RTCP & RTP share the kdf even though there is no check they are the same cipher.
The result of this function should be testable as there exists test vectors in a lot of RFC's.

Any public API changes should be done before 3.0 .

Lingua principale
C
Stelle
1.4k
Fork
523
Merge medio
3g 23h
PR unite (30g)
14

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cisco/libsrtp

Tutte le issue di cisco/libsrtp

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.