Code Monkey home page Code Monkey logo

java-xts-aes's Introduction

Java-XTS-AES

Java XTS-AES engine built over BouncyCastle. Created as a requirement for InflatableDonkey. Only byte aligned data units are supported.

Please refer to the unit tests for usage examples.

NB. Although it satisfies all of the supplied IEEE P1619 test vectors, I only have access to the DRAFT proposals and not the final document. In addition I make no claims to NIST conformance. Use at your own risk.

java-xts-aes's People

Contributors

horrorho avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

java-xts-aes's Issues

bug in a partial block processing

Hi Guys,

I tried NIST XTS test vectors with your code. Not all tests have passed.
The problem with the partial block processing. In particular, your code does not perform stealing of bits when data unit length is not multiple 8 bits, i.e., not a full byte.
Your current implementation assumes that the data unit length is always multiple of 8 bits, and thus it only performs bytes stealing (if needed).

For example, your code works if data unit length is 200 bits, i.e., input data length is full 25 bytes. However, size of 25 bytes is not multiple of 16, so your code will do bytes stealing in this case.

But, if data unit length is 250 bits, i.e., 31.25 bytes, where 31 bytes are full, and the last 32nd byte is not full. This last byte is padded with '0' to be full (according to NIST description of test vectors preparation). The padded bits in that particular padded byte should be replaced by applying bits stealing.

In fact, data unit lengths such as 130, 140, and 250 (all used by NIST) are not handled by your current implementation so that all such test vectors failed to pass.

According to the XTS-AES Validation System, the successful completion of the tests is required
to be validated as conforming to the XTS-AES algorithm standard.

Please, take a note of this issue.
FYI @horrorho

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.