Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AES-XTS : Tweak Value Increment when dataUnitLenMatchesPayload == false #302

Closed
afazio2 opened this issue Dec 13, 2023 · 5 comments
Closed
Assignees
Milestone

Comments

@afazio2
Copy link

afazio2 commented Dec 13, 2023

environment

Demo

testSessionId

464670

vsId

2025897

Algorithm registration

[
  {
    "acvVersion":"1.0"
  },
  {
    "isSample":true,
    "operation":"register",
    "certificateRequest":"no",
    "debugRequest":"yes",
    "production":"no",
    "encryptAtRest":"yes",
    "algorithms":[
      {
        "revision":"2.0",
        "algorithm":"ACVP-AES-XTS",
        "prereqVals":[
          {
            "algorithm":"AES",
            "valValue":"same"
          },
          {
            "algorithm":"DRBG",
            "valValue":"same"
          }
        ],
        "direction":[
          "encrypt",
          "decrypt"
        ],
        "keyLen":[
          128,
          256
        ],
        "payloadLen":[
          {
            "min":128,
            "max":65536,
            "increment":128
          }
        ],
        "tweakMode":[
          "hex"
        ],
        "dataUnitLen":[
          {
            "min":1024,
            "max":65536,
            "increment":128
          }
        ],
        "dataUnitLenMatchesPayload":false
      },
      ...
    ]
  }
]

Expected behavior

Process the vectors and obtain the same results as the expected answers.

Actual behavior

Vectors results differ from the expected answers when dataUnitLen differs from payloadLen .

We kindly ask to confirm the ACVP server logic behind the tweak value increment when dataUnitLen can differ from payloadLen.
We provide below an example:

Data Unit IUT Tweak Value Increment (little endian) ACVP Server Tweak Value Increment (little endian)
Data Unit #1 DF60B25ABDEC7163C531DBFF858C85FF DF60B25ABDEC7163C531DBFF858C85FF
Data Unit #2 E060B25ABDEC7163C531DBFF858C85FF E060B25ABDEC7163C531DBFF858C8500
Data Unit #3 E160B25ABDEC7163C531DBFF858C85FF E160B25ABDEC7163C531DBFF858C8500
Data Unit #4 E260B25ABDEC7163C531DBFF858C85FF E260B25ABDEC7163C531DBFF858C8500
Data Unit #5 E360B25ABDEC7163C531DBFF858C85FF E360B25ABDEC7163C531DBFF858C8500

It seems there's a similar issue #1475

@k-c-w
Copy link

k-c-w commented Jan 2, 2024

When would a fix for this issue be rolled out?

@jbrock24
Copy link
Collaborator

jbrock24 commented Jan 3, 2024

Currently working on it, a patch would be 2-3 weeks out from going to demo. I'll reply here earlier than that to let you know when it's done and when the expected release is going to be.

@jbrock24 jbrock24 added this to the v1.1.0.33 milestone Jan 3, 2024
@jbrock24
Copy link
Collaborator

Hi everyone, I have found the issue out and will be implementing a fix that will go out with the next release. Sorry for the inconvenience, and we really appreciate all the helpful info, thanks again. Once the release is out, we'll comment here that it's ready for testing. It will move to prod a week or two later.

@livebe01
Copy link
Collaborator

livebe01 commented Feb 1, 2024

The fix for this is on Demo in release v1.1.0.33

@livebe01
Copy link
Collaborator

livebe01 commented Feb 9, 2024

The fix for this is on Prod in release v1.1.0.33

@livebe01 livebe01 closed this as completed Feb 9, 2024
smuellerDD pushed a commit to smuellerDD/acvpparser that referenced this issue Jul 1, 2024
Increment AES-XTS tweak value correctly - starting from the most significant byte
- and align the AES-XTS code of common openssl backend to make it working with
both openssl and openssl3. This change is follow up after modification of
AES-XTS tweak incrementation algorithm in the ACVP server:
usnistgov/ACVP-Server#302

Signed-off-by: Karol Brzuskiewicz <kabr@arista.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants