Ticket #43469

暗号ライブラリの変更

Date d'ouverture: 2021-12-24 01:04 Dernière mise à jour: 2022-02-01 23:10

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
2
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Détails

  • OpenSSL 3 では、廃止予定になった API を使用していて warning が出る ... 添付
  • OpenSSL 3 は Windows 10 より前の Windows での検証が必要?(ttssh2-dev 92)
  • 新 API で呼び出すように変更すると LibreSSL へ乗り換えられない

ブランチ

  • OpenSSL 3 ... branches/openssl_3_0_1
  • LibreSSL ... branches/libressl_3_4_2

TODO

Ticket History (3/10 Histories)

2021-12-24 01:04 Updated by: nmaya
  • New Ticket "暗号ライブラリの変更" created
2021-12-28 23:56 Updated by: nmaya
Commentaire

暗号ライブラリの動作チェック

テスト

Windows 8.1 x64

  • 結果
    openssl_3_0_1libressl_3_4_2
    鍵交換
    diffie-hellman-group1-sha1
    diffie-hellman-group14-sha1
    diffie-hellman-group-exchange-sha1
    diffie-hellman-group-exchange-sha256
    ecdh-sha2-nistp256
    ecdh-sha2-nistp384
    ecdh-sha2-nistp521
    diffie-hellman-group14-sha256
    diffie-hellman-group16-sha512
    diffie-hellman-group18-sha512
    サーバホスト鍵
    ssh-rsa1
    ssh-dss
    ssh-rsa
    ecdsa-sha2-nistp256
    ecdsa-sha2-nistp384
    ecdsa-sha2-nistp521
    ssh-ed25519
    暗号アルゴリズム
    DES
    3DES
    Blowfish
    3des-cbc
    aes128-cbc
    aes192-cbc
    aes256-cbc
    blowfish-cbc×1
    cast128-cbc×1
    arcfour×1
    arcfour128×1
    arcfour256×1
    aes128-ctr×1
    aes192-ctr×1
    aes256-ctr×1
    3des-ctr
    blowfish-ctr
    cast128-ctr
    camellia128-cbc
    camellia192-cbc
    camellia256-cbc
    camellia128-ctr
    camellia192-ctr
    camellia256-ctr
    aes128-gcm@openssh.com
    aes256-gcm@openssh.com
    chacha20-poly1305@openssh.com
    MACアルゴリズム
    hmac-sha1
    hmac-md5
    hmac-sha1-96
    hmac-md5-96
    hmac-ripemd160@openssh.com×2
    hmac-sha2-256
    hmac-sha2-512
    hmac-sha1-etm@openssh.com
    hmac-md5-etm@openssh.com
    hmac-sha1-96-etm@openssh.com
    hmac-md5-96-etm@openssh.com
    hmac-ripemd160-etm@openssh.com×2
    hmac-sha2-256-etm@openssh.com
    hmac-sha2-512-etm@openssh.com
    認証鍵の署名方式
    rsa1
    ssh-dss
    ssh-rsa (RSA/SHA-1)
    ecdsa-sha2-nistp256
    ecdsa-sha2-nistp384
    ecdsa-sha2-nistp521
    ssh-ed25519

×1 接続が切れる。Cipher initialize error(6)

×2 デスクトップにダンプが出力され、Application Fault で落ちる

テスト2

Windows 10 x64

  • 結果
    暗号アルゴリズム
    blowfish-cbc×1
    cast128-cbc×1
    arcfour×1
    arcfour128×1
    arcfour256×1
    aes128-ctr×1
    aes192-ctr×1
    aes256-ctr×1
    MACアルゴリズム
    hmac-ripemd160@openssh.com×2
    hmac-ripemd160-etm@openssh.com×2

「Windows 10未満」なので動かないわけではない

(Edited, 2021-12-31 22:56 Updated by: nmaya)
2021-12-31 15:54 Updated by: nmaya
Commentaire

テスト3

Windows 8.1 x64

  • 結果
    openssl_3_0_1libressl_3_4_2
    DES
    3des-ctr×1
    blowfish-ctr×1
    cast128-ctr×1
    camellia128-cbc
    camellia192-cbc
    camellia256-cbc
    camellia128-ctr×1
    camellia192-ctr×1
    camellia256-ctr×1

LibreSSL だとすべて動作する。

(Edited, 2022-01-03 14:25 Updated by: nmaya)
2021-12-31 23:39 Updated by: nmaya
Commentaire

テスト4

  • 使用バイナリ
    • branches/openssl_3_0_1 + OpenSSL の関数に変更
  • テスト環境

Windows 8.1 x64

  • 結果
    openssl_3_0_1
    aes128-ctr
    aes192-ctr
    aes256-ctr
    camellia128-ctr
    camellia192-ctr
    camellia256-ctr

上記のアルゴリズムは、OpenSSL の関数に変更すると OpenSSL 3 でも動作する。

OpenSSL 3

cipher-ctr.c(NG)OpenSSL(NG)OpenSSL(OK)
blowfish-cbcEVP_bf_cbc() *1
cast128-cbcEVP_cast5_cbc() *1
arcfourEVP_rc4() *1
arcfour128EVP_rc4() *1
arcfour256EVP_rc4() *1
aes128-ctrevp_aes_128_ctr() *2EVP_aes_128_ctr()
aes192-ctrevp_aes_128_ctr() *2EVP_aes_192_ctr()
aes256-ctrevp_aes_128_ctr() *2EVP_aes_256_ctr()
3des-ctrevp_des3_ctr() *3
blowfish-ctrevp_bf_ctr() *3
cast128-ctrevp_cast5_ctr() *3
camellia128-ctrevp_camellia_128_ctr() *3EVP_camellia_128_ctr()
camellia192-ctrevp_camellia_128_ctr() *3EVP_camellia_192_ctr()
camellia256-ctrevp_camellia_128_ctr() *3EVP_camellia_256_ctr()
hmac-ripemd160@openssh.comEVP_ripemd160() *1
hmac-ripemd160-etm@openssh.comEVP_ripemd160() *1

*1 OpenSSL のバグ?

*2 この関数のコードは OpenSSH から持ってきたものだが、今の OpenSSH は OpenSSL に関数があればそちらを使うようになっている。現在 OpenSSH + OpenSSL の組み合わせでこの処理は使われていない。

*3 OpenSSH にはない。AES 以外の暗号アルゴリズムに *2 と同じ処理をしている。

(Edited, 2023-01-04 23:06 Updated by: nmaya)
2022-01-01 16:41 Updated by: nmaya
2022-01-01 18:19 Updated by: nmaya
  • Details Updated
2022-01-17 00:54 Updated by: nmaya
Commentaire
  • r9692 で libressl_3_4_2 をマージ
  • r9693 で openssl_3_0_1 をマージ(ライセンスまわり以外)
  • r9694 で、openssl_3_0_1 で OpenSSL の関数を使うようにした部分で LibreSSL にない関数があるので、LibreSSL のときは従来の関数を使うように調整
2022-02-01 23:10 Updated by: nmaya
  • État Update from Ouvert to Atteints
  • Résolution Update from Aucun to Fixed

Attachment File List

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion