-
Notifications
You must be signed in to change notification settings - Fork 0
README in Japanese #2
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
Open
MarkAtwood
wants to merge
1
commit into
main
Choose a base branch
from
readme-jp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| # zig-wolfssl | ||
|
|
||
| このレポジトリでは、wolfSSL および wolfCrypt のZig的な バインディングを提供します。 | ||
|
|
||
| **ライセンス:** GPL-3.0 またはコマーシャルライセンス(wolfSSL Inc.) | ||
|
|
||
| システムにインストールされた wolfSSL ライブラリにリンクし、TLS、暗号化、X.509 証明書、鍵導出、セキュアな乱数生成のネイティブ Zig API を提供します。 | ||
|
|
||
| ## 機能 | ||
|
|
||
| **TLS** -- クライアント/サーバー接続、コンテキスト管理、セッション再開(TLS 1.2/1.3) | ||
|
|
||
| **対称暗号** -- AES-GCM(ワンショットおよびストリーミング)、AES-CBC、AES-CTR、ChaCha20-Poly1305 | ||
|
|
||
| **ハッシュと MAC** -- SHA-1、SHA-224、SHA-256、SHA-384、SHA-512、SHA3-256、SHA3-384、SHA3-512、BLAKE2b-512、BLAKE2s-256、MD5、HMAC、AES-CMAC | ||
|
|
||
| **非対称暗号** -- RSA(PKCS#1 v1.5、PSS、OAEP)、ECC(ECDSA/ECDH P-256/P-384/P-521/SECP256K1)、Ed25519、Ed448、Curve25519、X448、Diffie-Hellman(FFDHE-2048/3072/4096) | ||
|
|
||
| **X.509** -- 証明書の解析、チェーン検証、PEM/DER/ファイル読み込み | ||
|
|
||
| **KDF** -- HKDF、PBKDF1、PBKDF2、scrypt | ||
|
|
||
| **RNG** -- 暗号論的に安全な乱数生成 | ||
|
|
||
| ## 前提条件 | ||
|
|
||
| wolfSSL がシステムにインストールされている必要があります。ビルドシステムは以下の優先順位で wolfSSL を検索します:`-Dwolfssl-src=` ビルドオプション、`WOLFSSL_SRC` 環境変数、またはフォールバックとして `pkg-config`。 | ||
|
|
||
| ```bash | ||
| cd ~/wolfssl | ||
| ./configure --enable-tls13 --enable-ecc --enable-ed25519 --enable-curve25519 \ | ||
| --enable-ed448 --enable-curve448 --enable-secp256k1 \ | ||
| --enable-aesgcm --enable-aesgcm-stream --enable-chacha \ | ||
| --enable-aescbc --enable-aesctr \ | ||
| --enable-sha512 --enable-sha224 --enable-sha3 --enable-blake2 \ | ||
| --enable-hkdf --enable-pwdbased --enable-scrypt \ | ||
| --enable-cmac --enable-rsapss --enable-keygen \ | ||
| --enable-certgen --enable-dh --enable-md5 \ | ||
| --enable-pss-salt-len-discover | ||
| make | ||
| sudo make install | ||
| sudo ldconfig | ||
| ``` | ||
|
|
||
| インストールを確認: | ||
|
|
||
| ```bash | ||
| pkg-config --modversion wolfssl | ||
| ``` | ||
|
|
||
| Zig ラッパーは wolfSSL をソースからコンパイルしません。事前にインストールされたシステムライブラリにリンクします。使用可能なアルゴリズムは wolfSSL ビルド時の `./configure` フラグによって異なります。ラッパーは `@hasDecl` を通じてコンパイル時に利用可能な機能を検出します。 | ||
|
|
||
| ## 最小 Zig バージョン | ||
|
|
||
| 0.16.0-dev.2877+627f03af9 | ||
|
|
||
| ## ビルド | ||
|
|
||
| ```bash | ||
| zig build | ||
| ``` | ||
|
|
||
| ## テスト | ||
|
|
||
| ```bash | ||
| zig build test | ||
| ``` | ||
|
|
||
| 一部のテストは wolfSSL の証明書ファイルを必要とします。ビルドシステムは以下の優先順位で wolfSSL ソースツリー(および `certs/` ディレクトリ)を検索します: | ||
|
|
||
| 1. `-Dwolfssl-src=<path>` ビルドオプション | ||
| 2. `WOLFSSL_SRC` 環境変数 | ||
| 3. `pkg-config` ヒューリスティック(未インストールのソースビルド用フォールバック) | ||
|
|
||
| ```bash | ||
| # ビルドオプションを使用する場合 | ||
| zig build test -Dwolfssl-src=/path/to/wolfssl | ||
|
|
||
| # 環境変数を使用する場合 | ||
| export WOLFSSL_SRC=/path/to/wolfssl | ||
| zig build test | ||
| ``` | ||
|
|
||
| 上記のいずれも解決できない場合でもビルドは成功します — 証明書依存のテストはビルドを中断するのではなく、実行時にファイルが見つからないエラーで失敗します。 | ||
|
|
||
| ## 使用方法 | ||
|
|
||
| ```zig | ||
| const wolfssl = @import("wolfssl"); | ||
|
|
||
| // ライブラリの初期化 | ||
| try wolfssl.init(); | ||
| defer wolfssl.deinit(); | ||
|
|
||
| // SHA-256 ハッシュ | ||
| var hasher = try wolfssl.crypto.hash.Hash(.sha256).init(); | ||
| defer hasher.deinit(); | ||
| try hasher.update("hello"); | ||
| var digest: [wolfssl.crypto.hash.Hash(.sha256).digest_length]u8 = undefined; | ||
| try hasher.final(&digest); | ||
|
|
||
| // システム CA 証明書を使用した TLS 1.3 クライアントコンテキスト | ||
| const config = wolfssl.tls.Config{ | ||
| .role = .client, | ||
| .min_version = .tls_1_3, | ||
| .max_version = .tls_1_3, | ||
| .ca_certs = .system, | ||
| }; | ||
| var ctx = try wolfssl.tls.Context.init(config); | ||
| defer ctx.deinit(); | ||
| ``` | ||
|
|
||
| ## プロジェクト構成 | ||
|
|
||
| ``` | ||
| src/ | ||
| root.zig -- 公開 API エントリーポイント | ||
| c.zig -- wolfSSL C ヘッダーの @cImport | ||
| tls/ -- TLS コンテキスト、接続、セッション | ||
| crypto/ -- 対称暗号、ハッシュ、MAC、非対称暗号 | ||
| x509/ -- 証明書の解析と検証 | ||
| kdf/ -- HKDF、PBKDF1、PBKDF2、scrypt | ||
| random.zig -- セキュアな乱数生成 | ||
| build.zig -- ビルドシステム(ライブラリ検索、テスト設定) | ||
| build.zig.zon -- パッケージマニフェスト(v0.2.0) | ||
| ``` | ||
|
|
||
| ## コマーシャルサポートとライセンス | ||
|
|
||
| wolfSSL Inc. は、zig-wolfssl およびその基盤となる wolfSSL エコシステム(wolfCrypt、wolfHSM、wolfProvider)に対して、コマーシャルサポート、コンサルティング、インテグレーションサービス、および NRE を提供しています。GPL-3.0 のコピーレフト条件が受け入れられない環境向けに、wolfSSL のコマーシャルライセンスも提供しています。 | ||
|
|
||
| | 用途 | 連絡先 | | ||
| |------|--------| | ||
| | 一般的な質問、移植、FIPS | [email protected] | | ||
| | コマーシャルライセンス | [email protected] | | ||
| | テクニカルサポート | [email protected] | | ||
| | 電話 | +1 (425) 245-8247 | | ||
| | Web | https://www.wolfssl.com/contact/ | | ||
|
|
||
| ## ライセンス | ||
|
|
||
| zig-wolfssl は wolfSSL Inc. の著作物(Copyright (C) 2026)であり、GNU General Public License v3.0(GPL-3.0)のもとでライセンスされています。詳細は | ||
| [https://www.gnu.org/licenses/gpl-3.0.html](https://www.gnu.org/licenses/gpl-3.0.html) をご参照ください。 | ||
|
|
||
| **コマーシャル** -- GPL-3.0 のコピーレフト条件がご利用の環境(プロプライエタリ製品、クローズドソース配布、OEM 組み込み)で受け入れられない場合、wolfSSL Inc. はコピーレフト義務を免除するコマーシャルライセンスを販売しています。 | ||
| [[email protected]](mailto:[email protected]) または +1 (425) 245-8247 までお問い合わせください。 | ||
|
|
||
| **wolfSSL / wolfCrypt**(必須依存関係):同じデュアルライセンスが適用されます -- オープンソース利用には GPL-3.0、プロプライエタリ展開には wolfSSL Inc. からのコマーシャルライセンスが必要です。GPL-3.0 のもとで wolfSSL に対して zig-wolfssl をリンクした製品を配布すると、結合された成果物全体に GPL-3.0 のコピーレフトが適用されます。 | ||
|
|
||
| **FIPS 140-3**: wolfCrypt は現行の FIPS 140-3 認証(#4718)を保有しています。FIPS 対応の展開には、別途ライセンスされた wolfCrypt FIPS バウンダリビルドが必要です。標準のオープンソース wolfSSL ビルドは検証済みモジュールではありません。 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
日本語の表現/スペースが不自然で、同README内の「ネイティブ Zig API」等の表記とも整合していません。「wolfCrypt のZig的な バインディング」はスペース位置と「の」の直後に英単語が連結している点を修正して、読みやすい表記(例: 「wolfCrypt の Zig 的なバインディング」等)に揃えるとよいです。