Lack of immediate access to GenericArray to view associated functions and trait impls leads to confusion and annoyance.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- rust
- Área
- cryptography
Línea de trabajo
Comienza revisando cómo aes-gcm y aes-gcm-siv exponen Nonce y cómo se utiliza GenericArray; después, lee la discusión del issue para conocer la dirección acordada de la API. Se considera terminado cuando los maintainers eligen y documentan un enfoque —volver a exportar GenericArray, añadir un wrapper u otro diseño— y abordan la compatibilidad y la documentación orientada al usuario.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
It's understandable that aes-gcm and aes-gcm-siv use generic_array's GenericArray's for the Nonce type. What's less understandable though is why this is left an opaque type and not either a wrapper with its own documentation of its methods custom to the uses of ges-gcm* or that GenericArray is not re-exported both for convenience as well as documentation. As a new user, I was really confused by the fact that I could not access the documentation for the underlying type to see what associated functions/methods it supports or even how to get one besides converting from a slice (as is demonstrated by the top-level crate documentation). Not everyone knows the generic_array crate and knows what GenericArray is and I had to look through the source to find the implementations of what I thought were a private type but turned out to be an import that is used on the front end by the user despite not only not being re-exported but there being no mention in the top-level crate documentation where this type comes from.
I would personally prefer turning Nonce into a newtype custom wrapper but I understand that this can be an issue due to the fact that it fundamentally introduces breaking changes.
The second best option is to simply re-export GenericArray. After all, aes-gcm-siv re-exports the entire aead crate just like aes-gcm which also re-exports aes in addition. I think this is by far the most uncontroversial option but the seemingly random re-export seems for some reason distasteful, I propose a third proposal:
This one is a compromise between the last two: create a new type called something like NonceWrapper that does exactly what I mentioned in the first proposal and then impl From for Nonce, unwrapping it. One could then have replace all instances of taking a Nonce type with impl Into. I can't see any breakage that would come of this but obviously it would still work even without the function refactors, just less convenient.
I would be willing to make a PR if and when a solution is agreed upon. I would love to hear others' thoughts.
- Lenguaje dominante
- Rust
- Estrellas
- 961
- Forks
- 200
- Merge medio
- 2 h 50 min
- PR fusionados (30 d)
- 3
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 RustCrypto/AEADs
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
RustCrypto/AEADs#864 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
RustCrypto/AEADs#765 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
RustCrypto/AEADs#755 · 1 comentario ·
-
ocb3: use parallel-capable APIsAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
RustCrypto/AEADs#706 · 1 comentario · 1 reacción ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
RustCrypto/AEADs#660 · 7 comentarios ·
Todos los issues de RustCrypto/AEADs
Issues similares
-
`sysknife history --help` says --since takes ISO-8601, and the parser refuses offsets and bare datesAbiertobug easy good first issue help wanted
Dificultad 1/5 1-3 horas Aptitud para principiantes 94/100
lacs-project/sysknife#519 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
area:breg bug criticality:p3 triage:needs-implementation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
registrystack/registry-stack#1699 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
lbjlaq/Antigravity-Manager#3539 · 2 comentarios ·
Los mantenedores suelen responder en 1 día