Skip to content

Cannot get valid data via kcapi_cipher_dec_aes_cbc for blocks > 64KiB #127

@apylchagin

Description

@apylchagin

Hello,

I'm experiencing issues with that function for blocks bigger than 64KiB. I'm working on migration from openssl based to kcapi based. The data is coming by 70-80KiB blocks and I need to decrypt them. There is a unit test which just compares the existing openssl based and the new kcapi based implementation. the byte-to-byte comparison is showing that the error exists ONLY in 16 bytes from 0x10000 all other parts of the entire decrypted data are identical.

The environment I've tried on:

  1. Stock Ubuntu 20.04 (Intel server platform)
  2. NXP imx8 (Android 10)

The quick check I've done by doubling the pagesize in _kcapi_handle_alloc() which avoid split the data into 64KiB blocks and after that the result is exactly the same to openssl output, i.e. all test have passed.

I've build 1.3.1 version by myself for both platforms.

Any guidance or recommendations would be appreciated. can it be that this function is deprecated for some reason?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions