Skip to content

[Webinterface] Sometimes downloads are scrambled #118

Closed

Description

@rfornea

image.png

Handle: dog2.pnge4e2f4bb4225ec6f3955f1984b61cb8c896a8714d0c93ae03bdddd855a20006aoa5qjqsm

This doesn't always happen, but from time to time I've noticed downloads seem scrambled. This seems to be an issue only very recently and I haven't figured out yet whether it's a broker or webinterface issue.

Activity

  1. Alisamix commented on May 12, 2018

    @Alisamix
    Contributor

    This was an issue in the first testnet already - not sure why this happens though.

  2. rfornea commented on May 15, 2018

    @rfornea
    ContributorAuthor

    Meant to post this here, but forgot. I think this is caused by the treasure chunk--webinterface is able to decrypt it for some reason, it doesn't come back "" or NULL like we'd thought it would. I'll add something into #109 that will fix this as well.

  3. rfornea commented on May 16, 2018

    @rfornea
    ContributorAuthor

    @automyr In order to fix this, I was planning on adding a chunk prefix to the file chunks that the webinterface could check for when it decrypts, much like the treasure prefix that I add to the treasure payloads on the brokernode that the webnode uses to figure out which chunks are treasure.

    Are there any problems with this approach? Jet mentioned using the tag was also an option.

  4. automyr commented on May 16, 2018

    @automyr
    Contributor

    I think this approach is fine, just add something like "chunk:" or "filedata:" in bytes at the start of the plaintext before passing it through AES.

    Beware the Birthday Paradox though, as if the bytestring that we're trying to match is too short, there's a possibility (and not as small as you'd think) that the starting bytes of a wrongly-decrypted ciphertext match our "tag".

  5. rfornea commented on May 16, 2018

    @rfornea
    ContributorAuthor

    I guess a solution to reduce this possibility would be making the prefix as long as possible while still getting 1 kb of data in the chunks?

  6. automyr commented on May 16, 2018

    @automyr
    Contributor

    That works. We don't need to go too crazy, something 32 bytes long is more than enough to never (never say never, but the probability does approach zero) have to worry about this, and we have more than enough space to accommodate this in one chunk.

  7. nullpilot commented on May 29, 2018

    @nullpilot
    Contributor

    This should be fixed with the gcm-authed chunks.

  8. rfornea commented on May 29, 2018

    @rfornea
    ContributorAuthor

    This issue was actually fixed when I implemented the prefixes, but I marked the issue as "done" rather than closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions