マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。

目次

概要

jose-jwtを使い倒す。

特徴

Readme.md中で、以下の様に述べられている。

比較

ライトユーザー向けではなく、ヘビーユーザー向け。

的な。

詳細

機能

JWS

署名・検証

JWE

暗号化・復号化

ユーティリティ

・・・

依存関係

以下を使用している。

参照設定

CAPI(CSP)、CNG

OpenSSL

Linux上

WSL上での.NET Core開発

「/mnt/c」※ 1 を経由して実行
※ 1 : DrvFs??のVFSファイルシステムプラグイン。

CNGが動作しない。

Unhandled Exception: System.PlatformNotSupportedException: Windows Cryptography Next Generation (CNG) is not supported on this platform.
   at System.Security.Cryptography.CngKeyBlobFormat.get_EccPrivateBlob()
   at Security.Cryptography.EccKey.New(Byte[] x, Byte[] y, Byte[] d, CngKeyUsages usage)

bcrypt.dllが見つからない。

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'bcrypt.dll': The specified module or one of its dependencies could not be found.
 (Exception from HRESULT: 0x8007007E)
   at Jose.native.BCrypt.BCryptOpenAlgorithmProvider(IntPtr& phAlgorithm, String pszAlgId, String pszImplementation, UInt32 dwFlags)
   at Jose.AesGcm.OpenAlgorithmProvider(String alg, String provider, String chainingMode)
   at Jose.AesGcm.Encrypt(Byte[] key, Byte[] iv, Byte[] aad, Byte[] plainText)
   at Jose.AesGcmKeyWrapManagement.WrapNewKey(Int32 cekSizeBits, Object key, IDictionary`2 header)
   at Jose.JWT.EncodeBytes(Byte[] payload, Object key, JweAlgorithm alg, JweEncryption enc, Nullable`1 compression, IDictionary`2 extraHeaders, JwtSettings settings)

参考

サンプル・コード

実装

https://github.com/OpenTouryoProject/SampleProgram/blob/master/Other/jose_jwt_Sample/jose_jwt_Sample/Program.cs

結果


Tags: :IT国際標準, :認証基盤, :クレームベース認証, :暗号化, :.NET Core, :.NET Standard


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS