aws / aws/aws-encryption-sdk-java

Question : how to random access or skip during decryption

Geschlossen
#2,121 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
240
Forks
125
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Problem:

I have a need to handle large files and service a random address range for decryption.
Looking throgh the exampes I dont see an effecient way to do this.
It seems that the underlying encryption data is framed, but the CryptoInputStream doesn't skip in an input stream, and there isnt a support for a Readable Channel that I am aware of

### Solution:
With the existing API - I could use skip in the InputStream, but this will (as I see it) decrypt and throw away the skipped bytes, with extra I/O and CPU load
With an enhanced implementation we could skip on the input stream to the start of a frame and then decrypt that frame (skipping internally to the offset needed by decodng and thowin a few bytes if needed)

### Out of scope:

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der bestehenden CryptoInputStream-API und ihrem Verhalten bei der Eingabe von gerahmten Verschlüsselungsdaten und vergleiche anschließend InputStream.skip mit der angeforderten Unterstützung für Readable Channel. Erledigt ist die Aufgabe, wenn ein Aufrufer einen zufälligen Adressbereich bedienen kann, indem er zum relevanten Frame springt und die Entschlüsselung sowie die I/O für verworfene Bytes vermeidet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, java
Bereich
security
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.