SoftHsm2 does not behave the same on ARM64 compared to X64

オープン
#803 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp

調査の方向性

Start by comparing EC public key access on Rocky 9 ARM64 with the working Rocky 8 ARM64 and x86_64 cases, using the secp384r1 and secp521r1 commands in the issue to reproduce the failure. Trace the path that reads a stored EC public key and creates the EVP_PKEY; the issue does not name source files or tests. Done means public key access succeeds on Rocky 9 ARM64 for both curves.

索引モデルが issue の本文から書いたものです。

説明

Hello,

I'm currently facing a strange discrepancy when using https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/s/softhsm-2.6.1-5.el8.1.x86_64.rpm and https://dl.fedoraproject.org/pub/epel/8/Everything/aarch64/Packages/s/softhsm-2.6.1-5.el8.1.aarch64.rpm

More precisely, x86_64 version behave as expected regarding EC key generation and public key access whereas aarch64 version allow generation but not public key access:

pkcs11-tool --module /usr/lib64/libsofthsm2.so --token-label test1 --keypairgen --key-type EC:secp521r1 --usage-derive --label test-ec-521 --id 3333333333 --sensitive -l -p 22222222

Key pair generated:
Private Key Object; EC
  label:      test-ec-521
  ID:         3333333333
  Usage:      decrypt, sign, unwrap, derive
  Access:     sensitive, always sensitive, never extractable, local
Public Key Object; EC  EC_POINT 528 bits
  EC_POINT:   048185040074708900a00254ef87ddcc66597a60951357680a245622c8baf5788f45dbeb2e5769aea9e9fa8ada11019a6285adc4734769ff51388fc7c037c18e78873424a014007a43a5ad9232bae4dabf4bc21f4a3b96bce47066b49645ee3d40b3fc166aad5cf3420167bb04840c1781e32de85024f8c0cbae36a63934fd0c48721219dcce7ad4
  EC_PARAMS:  06052b81040023
  label:      test-ec-521
  ID:         3333333333
  Usage:      encrypt, verify, wrap, derive
  Access:     local

pkcs11-tool --module /usr/lib64/libsofthsm2.so --token-label test1 -y pubkey -r --label test-ec-521
error: cannot create EVP_PKEY
Aborting.

pkcs11-tool --module /usr/lib64/libsofthsm2.so --token-label test2 --keypairgen --key-type EC:secp384r1 --usage-derive --label test-ec-384 --id 4444444444 --sensitive -l -p 33333333

Key pair generated:
Private Key Object; EC
  label:      test-ec-384
  ID:         4444444444
  Usage:      decrypt, sign, unwrap, derive
  Access:     sensitive, always sensitive, never extractable, local
Public Key Object; EC  EC_POINT 384 bits
  EC_POINT:   046104d9f8bcd72bc9a344c41d092d967ea9d274903b2b587cba29665607b0d2820c849bf3f28755a2a2f0a904365751f7e74dfa738021ed14e688348ffb86b111cbc69a43649501e10449505153e2f47ba42d4ea4a105916674cfbdcec5cf45688061
  EC_PARAMS:  06052b81040022
  label:      test-ec-384
  ID:         4444444444
  Usage:      encrypt, verify, wrap, derive
  Access:     local

pkcs11-tool --module /usr/lib64/libsofthsm2.so --token-label test2 -y pubkey -r --label test-ec-384
error: cannot create EVP_PKEY
Aborting.

[edit] the above failed behavior is experienced on rocky9 for arm64, but on rocky8 for arm64, it behaves as expected: public EC keys are correctly obtained.

Is there any plan for a fix to allow proper behavior on rocky9 for arm64?

主要言語
C++
スター
1.1k
フォーク
434
平均マージ
12日 14時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

softhsm/SoftHSMv2 のほかの issue

softhsm/SoftHSMv2 の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。