Skip to content

Commit

Permalink
Clarify passphrase for openssl_encrypt and openssl_decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Oct 31, 2024
1 parent e6105df commit 4958c1b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
18 changes: 14 additions & 4 deletions reference/openssl/functions/openssl-decrypt.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 6ad22de1921790bfccc8c9a2590a48ab63bf8dd3 Maintainer: satoruyoshida Status: ready -->
<!-- EN-Revision: e5ab2937efd9b1d7184993e0fdfa957893f7f827 Maintainer: satoruyoshida Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.openssl-decrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -22,7 +22,7 @@
</methodsynopsis>
<para>
未加工の、または base64 エンコードされた文字列を受け取り、
与えられた暗号化方式とキーを使って文字列を復号します
与えられた暗号化方式とパスフレーズを使って文字列を復号します
</para>

</refsect1>
Expand Down Expand Up @@ -52,8 +52,16 @@
<term><parameter>passphrase</parameter></term>
<listitem>
<para>
キー
パスフレーズ。パスフレーズが期待するよりも短い場合は、暗黙的に <literal>NUL</literal>
文字でパディングされます。パスフレーズが予想より長い場合、暗黙的に切り詰められます。
</para>
<caution>
<simpara>
パスフレーズは、その名前から連想されるような安全な鍵生成機能は内包していません。
内部で処理される唯一の操作は、期待する鍵長と異なる場合に <literal>NUL</literal> で
パディングしたり、切り詰めたりするだけです。
</simpara>
</caution>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -70,7 +78,9 @@
<term><parameter>iv</parameter></term>
<listitem>
<para>
NULL ではない初期化ベクトル
&null; ではない初期化ベクトル。 IV が期待よりも短い場合は、<literal>NUL</literal>
文字でパディングされ、警告が発行されます。
パスフレーズが期待よりも長い場合は、切り捨てられ、警告が発行されます。
</para>
</listitem>
</varlistentry>
Expand Down
15 changes: 12 additions & 3 deletions reference/openssl/functions/openssl-encrypt.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 6ad22de1921790bfccc8c9a2590a48ab63bf8dd3 Maintainer: satoruyoshida Status: ready -->
<!-- EN-Revision: 7a016103e0d568448f5985dfd945092d69d5d59c Maintainer: satoruyoshida Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.openssl-encrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -22,7 +22,7 @@
<methodparam choice="opt"><type>int</type><parameter>tag_length</parameter><initializer>16</initializer></methodparam>
</methodsynopsis>
<para>
与えられた文字列を与えられたメソッドとキーで暗号化して
与えられた文字列を与えられたメソッドとパスフレーズで暗号化して
未加工の、または base64 エンコードされた文字列を返します。
</para>
</refsect1>
Expand Down Expand Up @@ -58,6 +58,13 @@
期待された長さより長かった場合は、
黙って切り詰められます。
</para>
<caution>
<simpara>
パスフレーズは、その名前から連想されるような安全な鍵生成機能は内包していません。
内部で処理される唯一の操作は、期待する鍵長と異なる場合に <literal>NUL</literal> で
パディングしたり、切り詰めたりするだけです。
</simpara>
</caution>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -74,7 +81,9 @@
<term><parameter>iv</parameter></term>
<listitem>
<para>
NULL ではない初期化ベクトル。
&null; ではない初期化ベクトル。 IV が期待よりも短い場合は、<literal>NUL</literal>
文字でパディングされ、警告が発行されます。
パスフレーズが期待よりも長い場合は、切り捨てられ、警告が発行されます。
</para>
</listitem>
</varlistentry>
Expand Down

0 comments on commit 4958c1b

Please sign in to comment.