Raw AES Keyring zeros out passed in unwrappedMasterKey
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- cryptography
Línea de trabajo
Lee el código del gestor de materiales en modules/material-management/src/cryptographic_material.ts alrededor de las líneas 823-838 y, después, inspecciona el constructor de Raw AES keyring en modules/raw-aes-keyring-node/src/raw_aes_keyring_node.ts alrededor de la línea 63. Confirma que el constructor hace una copia defensiva de unwrappedMasterKey proporcionado por el cliente para que el procesamiento posterior del material no ponga a cero el buffer del llamador.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem:
The materials manager zeros out the dataKey in the processing of creating wrapping key material during construction:
https://github.com/aws/aws-encryption-sdk-javascript/blob/6b1d1a6cd62d56dfb47eb9b70307b5f9083e5e10/modules/material-management/src/cryptographic_material.ts#L823-L838
This is normally good practice. However in the case where the buffer has been passed in by the customer via Keyring creation, for example in the Raw AES Keyring case, this leads to surprising behavior.
The Raw AES Keyrings does not make a defensive copy of the key material before creating this material: https://github.com/aws/aws-encryption-sdk-javascript/blob/master/modules/raw-aes-keyring-node/src/raw_aes_keyring_node.ts#L63
And thus the "unwrappedMasterKey" that the customer passed in looks like it gets "consumed." This is surprising to the customer, especially since our docs have no indication of this behavior.
Solution:
The Raw AES Keyring should make a defensive copy of the "unwrappedMasterKey" in it's constructor. It is the responsibility of the customer to zero out the "unwrappedMasterKey" in their application after creation of the Keyring if it is no longer needed, in order to minimize the time the data key exists in plaintext in memory.
Out of scope:
Is there anything the solution will intentionally NOT address?
- Lenguaje dominante
- TypeScript
- Estrellas
- 260
- Forks
- 68
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws/aws-encryption-sdk-javascript
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
aws/aws-encryption-sdk-javascript#1656 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
aws/aws-encryption-sdk-javascript#1691 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
aws/aws-encryption-sdk-javascript#1665 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
aws/aws-encryption-sdk-javascript#1663 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
aws/aws-encryption-sdk-javascript#1520 · 1 comentario ·
Todos los issues de aws/aws-encryption-sdk-javascript
Issues similares
-
comp/desktop P3 type/bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
getsentry/sentry-javascript#24577 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Add 2021 Cup data to website Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
chrisparsons83/flexspotff#153 ·