ホーム › Security.Cryptography › NCRYPT_SSL_FUNCTION_TABLE
NCRYPT_SSL_FUNCTION_TABLE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | BCRYPT_INTERFACE_VERSION | 4 | +0 | +0 | SSLプロバイダーインターフェイスのバージョン。 |
| ComputeClientAuthHash | SslComputeClientAuthHashFn | 8/4 | +8 | +4 | クライアント認証ハッシュを計算する関数ポインタ。 |
| ComputeEapKeyBlock | SslComputeEapKeyBlockFn | 8/4 | +16 | +8 | EAP鍵ブロックを計算する関数ポインタ。 |
| ComputeFinishedHash | SslComputeFinishedHashFn | 8/4 | +24 | +12 | Finishedメッセージのハッシュを計算する関数ポインタ。 |
| CreateEphemeralKey | SslCreateEphemeralKeyFn | 8/4 | +32 | +16 | 一時鍵を生成する関数ポインタ。 |
| CreateHandshakeHash | SslCreateHandshakeHashFn | 8/4 | +40 | +20 | ハンドシェイクハッシュを生成する関数ポインタ。 |
| DecryptPacket | SslDecryptPacketFn | 8/4 | +48 | +24 | パケットを復号する関数ポインタ。 |
| EncryptPacket | SslEncryptPacketFn | 8/4 | +56 | +28 | パケットを暗号化する関数ポインタ。 |
| EnumCipherSuites | SslEnumCipherSuitesFn | 8/4 | +64 | +32 | 暗号スイートを列挙する関数ポインタ。 |
| ExportKey | SslExportKeyFn | 8/4 | +72 | +36 | 鍵をエクスポートする関数ポインタ。 |
| FreeBuffer | SslFreeBufferFn | 8/4 | +80 | +40 | バッファを解放する関数ポインタ。 |
| FreeObject | SslFreeObjectFn | 8/4 | +88 | +44 | オブジェクトを解放する関数ポインタ。 |
| GenerateMasterKey | SslGenerateMasterKeyFn | 8/4 | +96 | +48 | マスターキーを生成する関数ポインタ。 |
| GenerateSessionKeys | SslGenerateSessionKeysFn | 8/4 | +104 | +52 | セッション鍵を生成する関数ポインタ。 |
| GetKeyProperty | SslGetKeyPropertyFn | 8/4 | +112 | +56 | 鍵プロパティを取得する関数ポインタ。 |
| GetProviderProperty | SslGetProviderPropertyFn | 8/4 | +120 | +60 | プロバイダープロパティを取得する関数ポインタ。 |
| HashHandshake | SslHashHandshakeFn | 8/4 | +128 | +64 | ハンドシェイクメッセージをハッシュする関数ポインタ。 |
| ImportMasterKey | SslImportMasterKeyFn | 8/4 | +136 | +68 | マスターキーをインポートする関数ポインタ。 |
| ImportKey | SslImportKeyFn | 8/4 | +144 | +72 | 鍵をインポートする関数ポインタ。 |
| LookupCipherSuiteInfo | SslLookupCipherSuiteInfoFn | 8/4 | +152 | +76 | 暗号スイート情報を検索する関数ポインタ。 |
| OpenPrivateKey | SslOpenPrivateKeyFn | 8/4 | +160 | +80 | 秘密鍵を開く関数ポインタ。 |
| OpenProvider | SslOpenProviderFn | 8/4 | +168 | +84 | プロバイダーを開く関数ポインタ。 |
| SignHash | SslSignHashFn | 8/4 | +176 | +88 | ハッシュに署名する関数ポインタ。 |
| VerifySignature | SslVerifySignatureFn | 8/4 | +184 | +92 | 署名を検証する関数ポインタ。 |
| LookupCipherLengths | SslLookupCipherLengthsFn | 8/4 | +192 | +96 | 暗号長情報を検索する関数ポインタ。 |
| CreateClientAuthHash | SslCreateClientAuthHashFn | 8/4 | +200 | +100 | クライアント認証ハッシュを生成する関数ポインタ。 |
| GetCipherSuitePRFHashAlgorithm | SslGetCipherSuitePRFHashAlgorithmFn | 8/4 | +208 | +104 | 暗号スイートのPRFハッシュアルゴリズムを取得する関数ポインタ。 |
| ComputeSessionHash | SslComputeSessionHashFn | 8/4 | +216 | +108 | セッションハッシュを計算する関数ポインタ。 |
| GeneratePreMasterKey | SslGeneratePreMasterKeyFn | 8/4 | +224 | +112 | プリマスターキーを生成する関数ポインタ。 |
| EnumEccCurves | SslEnumEccCurvesFn | 8/4 | +232 | +116 | ECC曲線を列挙する関数ポインタ。 |
| ExportKeyingMaterial | SslExportKeyingMaterialFn | 8/4 | +240 | +120 | 鍵生成素材をエクスポートする関数ポインタ。 |
| ExtractEarlyKey | SslExtractEarlyKeyFn | 8/4 | +248 | +124 | TLS1.3のアーリーキーを抽出する関数ポインタ。 |
| ExtractHandshakeKey | SslExtractHandshakeKeyFn | 8/4 | +256 | +128 | TLS1.3のハンドシェイクキーを抽出する関数ポインタ。 |
| ExtractMasterKey | SslExtractMasterKeyFn | 8/4 | +264 | +132 | TLS1.3のマスターキーを抽出する関数ポインタ。 |
| ExpandTrafficKeys | SslExpandTrafficKeysFn | 8/4 | +272 | +136 | トラフィック鍵を展開する関数ポインタ。 |
| ExpandWriteKey | SslExpandWriteKeyFn | 8/4 | +280 | +140 | 書き込み鍵を展開する関数ポインタ。 |
| ExpandExporterMasterKey | SslExpandExporterMasterKeyFn | 8/4 | +288 | +144 | エクスポーターマスターキーを展開する関数ポインタ。 |
| EnumCipherSuitesEx | SslEnumCipherSuitesExFn | 8/4 | +296 | +148 | 暗号スイートを拡張列挙する関数ポインタ。 |
| ExpandResumptionMasterKey | SslExpandResumptionMasterKeyFn | 8/4 | +304 | +152 | 再開用マスターキーを展開する関数ポインタ。 |
| DuplicateTranscriptHash | SslDuplicateTranscriptHashFn | 8/4 | +312 | +156 | トランスクリプトハッシュを複製する関数ポインタ。 |
| ExpandBinderKey | SslExpandBinderKeyFn | 8/4 | +320 | +160 | バインダーキーを展開する関数ポインタ。 |
| ExpandPreSharedKey | SslExpandPreSharedKeyFn | 8/4 | +328 | +164 | 事前共有鍵(PSK)を展開する関数ポインタ。 |
各言語での定義
#include <windows.h>
// BCRYPT_INTERFACE_VERSION (x64 4 / x86 4 バイト)
typedef struct BCRYPT_INTERFACE_VERSION {
WORD MajorVersion;
WORD MinorVersion;
} BCRYPT_INTERFACE_VERSION;
// NCRYPT_SSL_FUNCTION_TABLE (x64 336 / x86 168 バイト)
typedef struct NCRYPT_SSL_FUNCTION_TABLE {
BCRYPT_INTERFACE_VERSION Version;
SslComputeClientAuthHashFn ComputeClientAuthHash;
SslComputeEapKeyBlockFn ComputeEapKeyBlock;
SslComputeFinishedHashFn ComputeFinishedHash;
SslCreateEphemeralKeyFn CreateEphemeralKey;
SslCreateHandshakeHashFn CreateHandshakeHash;
SslDecryptPacketFn DecryptPacket;
SslEncryptPacketFn EncryptPacket;
SslEnumCipherSuitesFn EnumCipherSuites;
SslExportKeyFn ExportKey;
SslFreeBufferFn FreeBuffer;
SslFreeObjectFn FreeObject;
SslGenerateMasterKeyFn GenerateMasterKey;
SslGenerateSessionKeysFn GenerateSessionKeys;
SslGetKeyPropertyFn GetKeyProperty;
SslGetProviderPropertyFn GetProviderProperty;
SslHashHandshakeFn HashHandshake;
SslImportMasterKeyFn ImportMasterKey;
SslImportKeyFn ImportKey;
SslLookupCipherSuiteInfoFn LookupCipherSuiteInfo;
SslOpenPrivateKeyFn OpenPrivateKey;
SslOpenProviderFn OpenProvider;
SslSignHashFn SignHash;
SslVerifySignatureFn VerifySignature;
SslLookupCipherLengthsFn LookupCipherLengths;
SslCreateClientAuthHashFn CreateClientAuthHash;
SslGetCipherSuitePRFHashAlgorithmFn GetCipherSuitePRFHashAlgorithm;
SslComputeSessionHashFn ComputeSessionHash;
SslGeneratePreMasterKeyFn GeneratePreMasterKey;
SslEnumEccCurvesFn EnumEccCurves;
SslExportKeyingMaterialFn ExportKeyingMaterial;
SslExtractEarlyKeyFn ExtractEarlyKey;
SslExtractHandshakeKeyFn ExtractHandshakeKey;
SslExtractMasterKeyFn ExtractMasterKey;
SslExpandTrafficKeysFn ExpandTrafficKeys;
SslExpandWriteKeyFn ExpandWriteKey;
SslExpandExporterMasterKeyFn ExpandExporterMasterKey;
SslEnumCipherSuitesExFn EnumCipherSuitesEx;
SslExpandResumptionMasterKeyFn ExpandResumptionMasterKey;
SslDuplicateTranscriptHashFn DuplicateTranscriptHash;
SslExpandBinderKeyFn ExpandBinderKey;
SslExpandPreSharedKeyFn ExpandPreSharedKey;
} NCRYPT_SSL_FUNCTION_TABLE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct BCRYPT_INTERFACE_VERSION
{
public ushort MajorVersion;
public ushort MinorVersion;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NCRYPT_SSL_FUNCTION_TABLE
{
public BCRYPT_INTERFACE_VERSION Version;
public IntPtr ComputeClientAuthHash;
public IntPtr ComputeEapKeyBlock;
public IntPtr ComputeFinishedHash;
public IntPtr CreateEphemeralKey;
public IntPtr CreateHandshakeHash;
public IntPtr DecryptPacket;
public IntPtr EncryptPacket;
public IntPtr EnumCipherSuites;
public IntPtr ExportKey;
public IntPtr FreeBuffer;
public IntPtr FreeObject;
public IntPtr GenerateMasterKey;
public IntPtr GenerateSessionKeys;
public IntPtr GetKeyProperty;
public IntPtr GetProviderProperty;
public IntPtr HashHandshake;
public IntPtr ImportMasterKey;
public IntPtr ImportKey;
public IntPtr LookupCipherSuiteInfo;
public IntPtr OpenPrivateKey;
public IntPtr OpenProvider;
public IntPtr SignHash;
public IntPtr VerifySignature;
public IntPtr LookupCipherLengths;
public IntPtr CreateClientAuthHash;
public IntPtr GetCipherSuitePRFHashAlgorithm;
public IntPtr ComputeSessionHash;
public IntPtr GeneratePreMasterKey;
public IntPtr EnumEccCurves;
public IntPtr ExportKeyingMaterial;
public IntPtr ExtractEarlyKey;
public IntPtr ExtractHandshakeKey;
public IntPtr ExtractMasterKey;
public IntPtr ExpandTrafficKeys;
public IntPtr ExpandWriteKey;
public IntPtr ExpandExporterMasterKey;
public IntPtr EnumCipherSuitesEx;
public IntPtr ExpandResumptionMasterKey;
public IntPtr DuplicateTranscriptHash;
public IntPtr ExpandBinderKey;
public IntPtr ExpandPreSharedKey;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure BCRYPT_INTERFACE_VERSION
Public MajorVersion As UShort
Public MinorVersion As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NCRYPT_SSL_FUNCTION_TABLE
Public Version As BCRYPT_INTERFACE_VERSION
Public ComputeClientAuthHash As IntPtr
Public ComputeEapKeyBlock As IntPtr
Public ComputeFinishedHash As IntPtr
Public CreateEphemeralKey As IntPtr
Public CreateHandshakeHash As IntPtr
Public DecryptPacket As IntPtr
Public EncryptPacket As IntPtr
Public EnumCipherSuites As IntPtr
Public ExportKey As IntPtr
Public FreeBuffer As IntPtr
Public FreeObject As IntPtr
Public GenerateMasterKey As IntPtr
Public GenerateSessionKeys As IntPtr
Public GetKeyProperty As IntPtr
Public GetProviderProperty As IntPtr
Public HashHandshake As IntPtr
Public ImportMasterKey As IntPtr
Public ImportKey As IntPtr
Public LookupCipherSuiteInfo As IntPtr
Public OpenPrivateKey As IntPtr
Public OpenProvider As IntPtr
Public SignHash As IntPtr
Public VerifySignature As IntPtr
Public LookupCipherLengths As IntPtr
Public CreateClientAuthHash As IntPtr
Public GetCipherSuitePRFHashAlgorithm As IntPtr
Public ComputeSessionHash As IntPtr
Public GeneratePreMasterKey As IntPtr
Public EnumEccCurves As IntPtr
Public ExportKeyingMaterial As IntPtr
Public ExtractEarlyKey As IntPtr
Public ExtractHandshakeKey As IntPtr
Public ExtractMasterKey As IntPtr
Public ExpandTrafficKeys As IntPtr
Public ExpandWriteKey As IntPtr
Public ExpandExporterMasterKey As IntPtr
Public EnumCipherSuitesEx As IntPtr
Public ExpandResumptionMasterKey As IntPtr
Public DuplicateTranscriptHash As IntPtr
Public ExpandBinderKey As IntPtr
Public ExpandPreSharedKey As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class BCRYPT_INTERFACE_VERSION(ctypes.Structure):
_fields_ = [
("MajorVersion", ctypes.c_ushort),
("MinorVersion", ctypes.c_ushort),
]
class NCRYPT_SSL_FUNCTION_TABLE(ctypes.Structure):
_fields_ = [
("Version", BCRYPT_INTERFACE_VERSION),
("ComputeClientAuthHash", ctypes.c_void_p),
("ComputeEapKeyBlock", ctypes.c_void_p),
("ComputeFinishedHash", ctypes.c_void_p),
("CreateEphemeralKey", ctypes.c_void_p),
("CreateHandshakeHash", ctypes.c_void_p),
("DecryptPacket", ctypes.c_void_p),
("EncryptPacket", ctypes.c_void_p),
("EnumCipherSuites", ctypes.c_void_p),
("ExportKey", ctypes.c_void_p),
("FreeBuffer", ctypes.c_void_p),
("FreeObject", ctypes.c_void_p),
("GenerateMasterKey", ctypes.c_void_p),
("GenerateSessionKeys", ctypes.c_void_p),
("GetKeyProperty", ctypes.c_void_p),
("GetProviderProperty", ctypes.c_void_p),
("HashHandshake", ctypes.c_void_p),
("ImportMasterKey", ctypes.c_void_p),
("ImportKey", ctypes.c_void_p),
("LookupCipherSuiteInfo", ctypes.c_void_p),
("OpenPrivateKey", ctypes.c_void_p),
("OpenProvider", ctypes.c_void_p),
("SignHash", ctypes.c_void_p),
("VerifySignature", ctypes.c_void_p),
("LookupCipherLengths", ctypes.c_void_p),
("CreateClientAuthHash", ctypes.c_void_p),
("GetCipherSuitePRFHashAlgorithm", ctypes.c_void_p),
("ComputeSessionHash", ctypes.c_void_p),
("GeneratePreMasterKey", ctypes.c_void_p),
("EnumEccCurves", ctypes.c_void_p),
("ExportKeyingMaterial", ctypes.c_void_p),
("ExtractEarlyKey", ctypes.c_void_p),
("ExtractHandshakeKey", ctypes.c_void_p),
("ExtractMasterKey", ctypes.c_void_p),
("ExpandTrafficKeys", ctypes.c_void_p),
("ExpandWriteKey", ctypes.c_void_p),
("ExpandExporterMasterKey", ctypes.c_void_p),
("EnumCipherSuitesEx", ctypes.c_void_p),
("ExpandResumptionMasterKey", ctypes.c_void_p),
("DuplicateTranscriptHash", ctypes.c_void_p),
("ExpandBinderKey", ctypes.c_void_p),
("ExpandPreSharedKey", ctypes.c_void_p),
]#[repr(C)]
pub struct BCRYPT_INTERFACE_VERSION {
pub MajorVersion: u16,
pub MinorVersion: u16,
}
#[repr(C)]
pub struct NCRYPT_SSL_FUNCTION_TABLE {
pub Version: BCRYPT_INTERFACE_VERSION,
pub ComputeClientAuthHash: *mut core::ffi::c_void,
pub ComputeEapKeyBlock: *mut core::ffi::c_void,
pub ComputeFinishedHash: *mut core::ffi::c_void,
pub CreateEphemeralKey: *mut core::ffi::c_void,
pub CreateHandshakeHash: *mut core::ffi::c_void,
pub DecryptPacket: *mut core::ffi::c_void,
pub EncryptPacket: *mut core::ffi::c_void,
pub EnumCipherSuites: *mut core::ffi::c_void,
pub ExportKey: *mut core::ffi::c_void,
pub FreeBuffer: *mut core::ffi::c_void,
pub FreeObject: *mut core::ffi::c_void,
pub GenerateMasterKey: *mut core::ffi::c_void,
pub GenerateSessionKeys: *mut core::ffi::c_void,
pub GetKeyProperty: *mut core::ffi::c_void,
pub GetProviderProperty: *mut core::ffi::c_void,
pub HashHandshake: *mut core::ffi::c_void,
pub ImportMasterKey: *mut core::ffi::c_void,
pub ImportKey: *mut core::ffi::c_void,
pub LookupCipherSuiteInfo: *mut core::ffi::c_void,
pub OpenPrivateKey: *mut core::ffi::c_void,
pub OpenProvider: *mut core::ffi::c_void,
pub SignHash: *mut core::ffi::c_void,
pub VerifySignature: *mut core::ffi::c_void,
pub LookupCipherLengths: *mut core::ffi::c_void,
pub CreateClientAuthHash: *mut core::ffi::c_void,
pub GetCipherSuitePRFHashAlgorithm: *mut core::ffi::c_void,
pub ComputeSessionHash: *mut core::ffi::c_void,
pub GeneratePreMasterKey: *mut core::ffi::c_void,
pub EnumEccCurves: *mut core::ffi::c_void,
pub ExportKeyingMaterial: *mut core::ffi::c_void,
pub ExtractEarlyKey: *mut core::ffi::c_void,
pub ExtractHandshakeKey: *mut core::ffi::c_void,
pub ExtractMasterKey: *mut core::ffi::c_void,
pub ExpandTrafficKeys: *mut core::ffi::c_void,
pub ExpandWriteKey: *mut core::ffi::c_void,
pub ExpandExporterMasterKey: *mut core::ffi::c_void,
pub EnumCipherSuitesEx: *mut core::ffi::c_void,
pub ExpandResumptionMasterKey: *mut core::ffi::c_void,
pub DuplicateTranscriptHash: *mut core::ffi::c_void,
pub ExpandBinderKey: *mut core::ffi::c_void,
pub ExpandPreSharedKey: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type BCRYPT_INTERFACE_VERSION struct {
MajorVersion uint16
MinorVersion uint16
}
type NCRYPT_SSL_FUNCTION_TABLE struct {
Version BCRYPT_INTERFACE_VERSION
ComputeClientAuthHash uintptr
ComputeEapKeyBlock uintptr
ComputeFinishedHash uintptr
CreateEphemeralKey uintptr
CreateHandshakeHash uintptr
DecryptPacket uintptr
EncryptPacket uintptr
EnumCipherSuites uintptr
ExportKey uintptr
FreeBuffer uintptr
FreeObject uintptr
GenerateMasterKey uintptr
GenerateSessionKeys uintptr
GetKeyProperty uintptr
GetProviderProperty uintptr
HashHandshake uintptr
ImportMasterKey uintptr
ImportKey uintptr
LookupCipherSuiteInfo uintptr
OpenPrivateKey uintptr
OpenProvider uintptr
SignHash uintptr
VerifySignature uintptr
LookupCipherLengths uintptr
CreateClientAuthHash uintptr
GetCipherSuitePRFHashAlgorithm uintptr
ComputeSessionHash uintptr
GeneratePreMasterKey uintptr
EnumEccCurves uintptr
ExportKeyingMaterial uintptr
ExtractEarlyKey uintptr
ExtractHandshakeKey uintptr
ExtractMasterKey uintptr
ExpandTrafficKeys uintptr
ExpandWriteKey uintptr
ExpandExporterMasterKey uintptr
EnumCipherSuitesEx uintptr
ExpandResumptionMasterKey uintptr
DuplicateTranscriptHash uintptr
ExpandBinderKey uintptr
ExpandPreSharedKey uintptr
}type
BCRYPT_INTERFACE_VERSION = record
MajorVersion: Word;
MinorVersion: Word;
end;
NCRYPT_SSL_FUNCTION_TABLE = record
Version: BCRYPT_INTERFACE_VERSION;
ComputeClientAuthHash: Pointer;
ComputeEapKeyBlock: Pointer;
ComputeFinishedHash: Pointer;
CreateEphemeralKey: Pointer;
CreateHandshakeHash: Pointer;
DecryptPacket: Pointer;
EncryptPacket: Pointer;
EnumCipherSuites: Pointer;
ExportKey: Pointer;
FreeBuffer: Pointer;
FreeObject: Pointer;
GenerateMasterKey: Pointer;
GenerateSessionKeys: Pointer;
GetKeyProperty: Pointer;
GetProviderProperty: Pointer;
HashHandshake: Pointer;
ImportMasterKey: Pointer;
ImportKey: Pointer;
LookupCipherSuiteInfo: Pointer;
OpenPrivateKey: Pointer;
OpenProvider: Pointer;
SignHash: Pointer;
VerifySignature: Pointer;
LookupCipherLengths: Pointer;
CreateClientAuthHash: Pointer;
GetCipherSuitePRFHashAlgorithm: Pointer;
ComputeSessionHash: Pointer;
GeneratePreMasterKey: Pointer;
EnumEccCurves: Pointer;
ExportKeyingMaterial: Pointer;
ExtractEarlyKey: Pointer;
ExtractHandshakeKey: Pointer;
ExtractMasterKey: Pointer;
ExpandTrafficKeys: Pointer;
ExpandWriteKey: Pointer;
ExpandExporterMasterKey: Pointer;
EnumCipherSuitesEx: Pointer;
ExpandResumptionMasterKey: Pointer;
DuplicateTranscriptHash: Pointer;
ExpandBinderKey: Pointer;
ExpandPreSharedKey: Pointer;
end;const BCRYPT_INTERFACE_VERSION = extern struct {
MajorVersion: u16,
MinorVersion: u16,
};
const NCRYPT_SSL_FUNCTION_TABLE = extern struct {
Version: BCRYPT_INTERFACE_VERSION,
ComputeClientAuthHash: ?*anyopaque,
ComputeEapKeyBlock: ?*anyopaque,
ComputeFinishedHash: ?*anyopaque,
CreateEphemeralKey: ?*anyopaque,
CreateHandshakeHash: ?*anyopaque,
DecryptPacket: ?*anyopaque,
EncryptPacket: ?*anyopaque,
EnumCipherSuites: ?*anyopaque,
ExportKey: ?*anyopaque,
FreeBuffer: ?*anyopaque,
FreeObject: ?*anyopaque,
GenerateMasterKey: ?*anyopaque,
GenerateSessionKeys: ?*anyopaque,
GetKeyProperty: ?*anyopaque,
GetProviderProperty: ?*anyopaque,
HashHandshake: ?*anyopaque,
ImportMasterKey: ?*anyopaque,
ImportKey: ?*anyopaque,
LookupCipherSuiteInfo: ?*anyopaque,
OpenPrivateKey: ?*anyopaque,
OpenProvider: ?*anyopaque,
SignHash: ?*anyopaque,
VerifySignature: ?*anyopaque,
LookupCipherLengths: ?*anyopaque,
CreateClientAuthHash: ?*anyopaque,
GetCipherSuitePRFHashAlgorithm: ?*anyopaque,
ComputeSessionHash: ?*anyopaque,
GeneratePreMasterKey: ?*anyopaque,
EnumEccCurves: ?*anyopaque,
ExportKeyingMaterial: ?*anyopaque,
ExtractEarlyKey: ?*anyopaque,
ExtractHandshakeKey: ?*anyopaque,
ExtractMasterKey: ?*anyopaque,
ExpandTrafficKeys: ?*anyopaque,
ExpandWriteKey: ?*anyopaque,
ExpandExporterMasterKey: ?*anyopaque,
EnumCipherSuitesEx: ?*anyopaque,
ExpandResumptionMasterKey: ?*anyopaque,
DuplicateTranscriptHash: ?*anyopaque,
ExpandBinderKey: ?*anyopaque,
ExpandPreSharedKey: ?*anyopaque,
};type
BCRYPT_INTERFACE_VERSION {.bycopy.} = object
MajorVersion: uint16
MinorVersion: uint16
NCRYPT_SSL_FUNCTION_TABLE {.bycopy.} = object
Version: BCRYPT_INTERFACE_VERSION
ComputeClientAuthHash: pointer
ComputeEapKeyBlock: pointer
ComputeFinishedHash: pointer
CreateEphemeralKey: pointer
CreateHandshakeHash: pointer
DecryptPacket: pointer
EncryptPacket: pointer
EnumCipherSuites: pointer
ExportKey: pointer
FreeBuffer: pointer
FreeObject: pointer
GenerateMasterKey: pointer
GenerateSessionKeys: pointer
GetKeyProperty: pointer
GetProviderProperty: pointer
HashHandshake: pointer
ImportMasterKey: pointer
ImportKey: pointer
LookupCipherSuiteInfo: pointer
OpenPrivateKey: pointer
OpenProvider: pointer
SignHash: pointer
VerifySignature: pointer
LookupCipherLengths: pointer
CreateClientAuthHash: pointer
GetCipherSuitePRFHashAlgorithm: pointer
ComputeSessionHash: pointer
GeneratePreMasterKey: pointer
EnumEccCurves: pointer
ExportKeyingMaterial: pointer
ExtractEarlyKey: pointer
ExtractHandshakeKey: pointer
ExtractMasterKey: pointer
ExpandTrafficKeys: pointer
ExpandWriteKey: pointer
ExpandExporterMasterKey: pointer
EnumCipherSuitesEx: pointer
ExpandResumptionMasterKey: pointer
DuplicateTranscriptHash: pointer
ExpandBinderKey: pointer
ExpandPreSharedKey: pointerstruct BCRYPT_INTERFACE_VERSION
{
ushort MajorVersion;
ushort MinorVersion;
}
struct NCRYPT_SSL_FUNCTION_TABLE
{
BCRYPT_INTERFACE_VERSION Version;
void* ComputeClientAuthHash;
void* ComputeEapKeyBlock;
void* ComputeFinishedHash;
void* CreateEphemeralKey;
void* CreateHandshakeHash;
void* DecryptPacket;
void* EncryptPacket;
void* EnumCipherSuites;
void* ExportKey;
void* FreeBuffer;
void* FreeObject;
void* GenerateMasterKey;
void* GenerateSessionKeys;
void* GetKeyProperty;
void* GetProviderProperty;
void* HashHandshake;
void* ImportMasterKey;
void* ImportKey;
void* LookupCipherSuiteInfo;
void* OpenPrivateKey;
void* OpenProvider;
void* SignHash;
void* VerifySignature;
void* LookupCipherLengths;
void* CreateClientAuthHash;
void* GetCipherSuitePRFHashAlgorithm;
void* ComputeSessionHash;
void* GeneratePreMasterKey;
void* EnumEccCurves;
void* ExportKeyingMaterial;
void* ExtractEarlyKey;
void* ExtractHandshakeKey;
void* ExtractMasterKey;
void* ExpandTrafficKeys;
void* ExpandWriteKey;
void* ExpandExporterMasterKey;
void* EnumCipherSuitesEx;
void* ExpandResumptionMasterKey;
void* DuplicateTranscriptHash;
void* ExpandBinderKey;
void* ExpandPreSharedKey;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; NCRYPT_SSL_FUNCTION_TABLE サイズ: 168 バイト(x86)
dim st, 42 ; 4byte整数×42(構造体サイズ 168 / 4 切り上げ)
; Version : BCRYPT_INTERFACE_VERSION (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; ComputeClientAuthHash : SslComputeClientAuthHashFn (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ComputeEapKeyBlock : SslComputeEapKeyBlockFn (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ComputeFinishedHash : SslComputeFinishedHashFn (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; CreateEphemeralKey : SslCreateEphemeralKeyFn (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; CreateHandshakeHash : SslCreateHandshakeHashFn (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; DecryptPacket : SslDecryptPacketFn (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; EncryptPacket : SslEncryptPacketFn (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; EnumCipherSuites : SslEnumCipherSuitesFn (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ExportKey : SslExportKeyFn (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; FreeBuffer : SslFreeBufferFn (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; FreeObject : SslFreeObjectFn (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; GenerateMasterKey : SslGenerateMasterKeyFn (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; GenerateSessionKeys : SslGenerateSessionKeysFn (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; GetKeyProperty : SslGetKeyPropertyFn (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; GetProviderProperty : SslGetProviderPropertyFn (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; HashHandshake : SslHashHandshakeFn (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ImportMasterKey : SslImportMasterKeyFn (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ImportKey : SslImportKeyFn (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; LookupCipherSuiteInfo : SslLookupCipherSuiteInfoFn (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; OpenPrivateKey : SslOpenPrivateKeyFn (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; OpenProvider : SslOpenProviderFn (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; SignHash : SslSignHashFn (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; VerifySignature : SslVerifySignatureFn (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; LookupCipherLengths : SslLookupCipherLengthsFn (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; CreateClientAuthHash : SslCreateClientAuthHashFn (+100, 4byte) st.25 = 値 / 値 = st.25 (lpoke/lpeek も可)
; GetCipherSuitePRFHashAlgorithm : SslGetCipherSuitePRFHashAlgorithmFn (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; ComputeSessionHash : SslComputeSessionHashFn (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; GeneratePreMasterKey : SslGeneratePreMasterKeyFn (+112, 4byte) st.28 = 値 / 値 = st.28 (lpoke/lpeek も可)
; EnumEccCurves : SslEnumEccCurvesFn (+116, 4byte) st.29 = 値 / 値 = st.29 (lpoke/lpeek も可)
; ExportKeyingMaterial : SslExportKeyingMaterialFn (+120, 4byte) st.30 = 値 / 値 = st.30 (lpoke/lpeek も可)
; ExtractEarlyKey : SslExtractEarlyKeyFn (+124, 4byte) st.31 = 値 / 値 = st.31 (lpoke/lpeek も可)
; ExtractHandshakeKey : SslExtractHandshakeKeyFn (+128, 4byte) st.32 = 値 / 値 = st.32 (lpoke/lpeek も可)
; ExtractMasterKey : SslExtractMasterKeyFn (+132, 4byte) st.33 = 値 / 値 = st.33 (lpoke/lpeek も可)
; ExpandTrafficKeys : SslExpandTrafficKeysFn (+136, 4byte) st.34 = 値 / 値 = st.34 (lpoke/lpeek も可)
; ExpandWriteKey : SslExpandWriteKeyFn (+140, 4byte) st.35 = 値 / 値 = st.35 (lpoke/lpeek も可)
; ExpandExporterMasterKey : SslExpandExporterMasterKeyFn (+144, 4byte) st.36 = 値 / 値 = st.36 (lpoke/lpeek も可)
; EnumCipherSuitesEx : SslEnumCipherSuitesExFn (+148, 4byte) st.37 = 値 / 値 = st.37 (lpoke/lpeek も可)
; ExpandResumptionMasterKey : SslExpandResumptionMasterKeyFn (+152, 4byte) st.38 = 値 / 値 = st.38 (lpoke/lpeek も可)
; DuplicateTranscriptHash : SslDuplicateTranscriptHashFn (+156, 4byte) st.39 = 値 / 値 = st.39 (lpoke/lpeek も可)
; ExpandBinderKey : SslExpandBinderKeyFn (+160, 4byte) st.40 = 値 / 値 = st.40 (lpoke/lpeek も可)
; ExpandPreSharedKey : SslExpandPreSharedKeyFn (+164, 4byte) st.41 = 値 / 値 = st.41 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NCRYPT_SSL_FUNCTION_TABLE サイズ: 336 バイト(x64)
dim st, 84 ; 4byte整数×84(構造体サイズ 336 / 4 切り上げ)
; Version : BCRYPT_INTERFACE_VERSION (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; ComputeClientAuthHash : SslComputeClientAuthHashFn (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ComputeEapKeyBlock : SslComputeEapKeyBlockFn (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ComputeFinishedHash : SslComputeFinishedHashFn (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; CreateEphemeralKey : SslCreateEphemeralKeyFn (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; CreateHandshakeHash : SslCreateHandshakeHashFn (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; DecryptPacket : SslDecryptPacketFn (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; EncryptPacket : SslEncryptPacketFn (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; EnumCipherSuites : SslEnumCipherSuitesFn (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ExportKey : SslExportKeyFn (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; FreeBuffer : SslFreeBufferFn (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; FreeObject : SslFreeObjectFn (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; GenerateMasterKey : SslGenerateMasterKeyFn (+96, 8byte) qpoke st,96,値 / qpeek(st,96) ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; GenerateSessionKeys : SslGenerateSessionKeysFn (+104, 8byte) qpoke st,104,値 / qpeek(st,104) ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; GetKeyProperty : SslGetKeyPropertyFn (+112, 8byte) qpoke st,112,値 / qpeek(st,112) ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; GetProviderProperty : SslGetProviderPropertyFn (+120, 8byte) qpoke st,120,値 / qpeek(st,120) ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; HashHandshake : SslHashHandshakeFn (+128, 8byte) qpoke st,128,値 / qpeek(st,128) ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; ImportMasterKey : SslImportMasterKeyFn (+136, 8byte) qpoke st,136,値 / qpeek(st,136) ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; ImportKey : SslImportKeyFn (+144, 8byte) qpoke st,144,値 / qpeek(st,144) ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; LookupCipherSuiteInfo : SslLookupCipherSuiteInfoFn (+152, 8byte) qpoke st,152,値 / qpeek(st,152) ※IronHSPのみ。3.7/3.8は lpoke st,152,下位 : lpoke st,156,上位
; OpenPrivateKey : SslOpenPrivateKeyFn (+160, 8byte) qpoke st,160,値 / qpeek(st,160) ※IronHSPのみ。3.7/3.8は lpoke st,160,下位 : lpoke st,164,上位
; OpenProvider : SslOpenProviderFn (+168, 8byte) qpoke st,168,値 / qpeek(st,168) ※IronHSPのみ。3.7/3.8は lpoke st,168,下位 : lpoke st,172,上位
; SignHash : SslSignHashFn (+176, 8byte) qpoke st,176,値 / qpeek(st,176) ※IronHSPのみ。3.7/3.8は lpoke st,176,下位 : lpoke st,180,上位
; VerifySignature : SslVerifySignatureFn (+184, 8byte) qpoke st,184,値 / qpeek(st,184) ※IronHSPのみ。3.7/3.8は lpoke st,184,下位 : lpoke st,188,上位
; LookupCipherLengths : SslLookupCipherLengthsFn (+192, 8byte) qpoke st,192,値 / qpeek(st,192) ※IronHSPのみ。3.7/3.8は lpoke st,192,下位 : lpoke st,196,上位
; CreateClientAuthHash : SslCreateClientAuthHashFn (+200, 8byte) qpoke st,200,値 / qpeek(st,200) ※IronHSPのみ。3.7/3.8は lpoke st,200,下位 : lpoke st,204,上位
; GetCipherSuitePRFHashAlgorithm : SslGetCipherSuitePRFHashAlgorithmFn (+208, 8byte) qpoke st,208,値 / qpeek(st,208) ※IronHSPのみ。3.7/3.8は lpoke st,208,下位 : lpoke st,212,上位
; ComputeSessionHash : SslComputeSessionHashFn (+216, 8byte) qpoke st,216,値 / qpeek(st,216) ※IronHSPのみ。3.7/3.8は lpoke st,216,下位 : lpoke st,220,上位
; GeneratePreMasterKey : SslGeneratePreMasterKeyFn (+224, 8byte) qpoke st,224,値 / qpeek(st,224) ※IronHSPのみ。3.7/3.8は lpoke st,224,下位 : lpoke st,228,上位
; EnumEccCurves : SslEnumEccCurvesFn (+232, 8byte) qpoke st,232,値 / qpeek(st,232) ※IronHSPのみ。3.7/3.8は lpoke st,232,下位 : lpoke st,236,上位
; ExportKeyingMaterial : SslExportKeyingMaterialFn (+240, 8byte) qpoke st,240,値 / qpeek(st,240) ※IronHSPのみ。3.7/3.8は lpoke st,240,下位 : lpoke st,244,上位
; ExtractEarlyKey : SslExtractEarlyKeyFn (+248, 8byte) qpoke st,248,値 / qpeek(st,248) ※IronHSPのみ。3.7/3.8は lpoke st,248,下位 : lpoke st,252,上位
; ExtractHandshakeKey : SslExtractHandshakeKeyFn (+256, 8byte) qpoke st,256,値 / qpeek(st,256) ※IronHSPのみ。3.7/3.8は lpoke st,256,下位 : lpoke st,260,上位
; ExtractMasterKey : SslExtractMasterKeyFn (+264, 8byte) qpoke st,264,値 / qpeek(st,264) ※IronHSPのみ。3.7/3.8は lpoke st,264,下位 : lpoke st,268,上位
; ExpandTrafficKeys : SslExpandTrafficKeysFn (+272, 8byte) qpoke st,272,値 / qpeek(st,272) ※IronHSPのみ。3.7/3.8は lpoke st,272,下位 : lpoke st,276,上位
; ExpandWriteKey : SslExpandWriteKeyFn (+280, 8byte) qpoke st,280,値 / qpeek(st,280) ※IronHSPのみ。3.7/3.8は lpoke st,280,下位 : lpoke st,284,上位
; ExpandExporterMasterKey : SslExpandExporterMasterKeyFn (+288, 8byte) qpoke st,288,値 / qpeek(st,288) ※IronHSPのみ。3.7/3.8は lpoke st,288,下位 : lpoke st,292,上位
; EnumCipherSuitesEx : SslEnumCipherSuitesExFn (+296, 8byte) qpoke st,296,値 / qpeek(st,296) ※IronHSPのみ。3.7/3.8は lpoke st,296,下位 : lpoke st,300,上位
; ExpandResumptionMasterKey : SslExpandResumptionMasterKeyFn (+304, 8byte) qpoke st,304,値 / qpeek(st,304) ※IronHSPのみ。3.7/3.8は lpoke st,304,下位 : lpoke st,308,上位
; DuplicateTranscriptHash : SslDuplicateTranscriptHashFn (+312, 8byte) qpoke st,312,値 / qpeek(st,312) ※IronHSPのみ。3.7/3.8は lpoke st,312,下位 : lpoke st,316,上位
; ExpandBinderKey : SslExpandBinderKeyFn (+320, 8byte) qpoke st,320,値 / qpeek(st,320) ※IronHSPのみ。3.7/3.8は lpoke st,320,下位 : lpoke st,324,上位
; ExpandPreSharedKey : SslExpandPreSharedKeyFn (+328, 8byte) qpoke st,328,値 / qpeek(st,328) ※IronHSPのみ。3.7/3.8は lpoke st,328,下位 : lpoke st,332,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global BCRYPT_INTERFACE_VERSION
#field short MajorVersion
#field short MinorVersion
#endstruct
#defstruct global NCRYPT_SSL_FUNCTION_TABLE
#field BCRYPT_INTERFACE_VERSION Version
#field intptr ComputeClientAuthHash
#field intptr ComputeEapKeyBlock
#field intptr ComputeFinishedHash
#field intptr CreateEphemeralKey
#field intptr CreateHandshakeHash
#field intptr DecryptPacket
#field intptr EncryptPacket
#field intptr EnumCipherSuites
#field intptr ExportKey
#field intptr FreeBuffer
#field intptr FreeObject
#field intptr GenerateMasterKey
#field intptr GenerateSessionKeys
#field intptr GetKeyProperty
#field intptr GetProviderProperty
#field intptr HashHandshake
#field intptr ImportMasterKey
#field intptr ImportKey
#field intptr LookupCipherSuiteInfo
#field intptr OpenPrivateKey
#field intptr OpenProvider
#field intptr SignHash
#field intptr VerifySignature
#field intptr LookupCipherLengths
#field intptr CreateClientAuthHash
#field intptr GetCipherSuitePRFHashAlgorithm
#field intptr ComputeSessionHash
#field intptr GeneratePreMasterKey
#field intptr EnumEccCurves
#field intptr ExportKeyingMaterial
#field intptr ExtractEarlyKey
#field intptr ExtractHandshakeKey
#field intptr ExtractMasterKey
#field intptr ExpandTrafficKeys
#field intptr ExpandWriteKey
#field intptr ExpandExporterMasterKey
#field intptr EnumCipherSuitesEx
#field intptr ExpandResumptionMasterKey
#field intptr DuplicateTranscriptHash
#field intptr ExpandBinderKey
#field intptr ExpandPreSharedKey
#endstruct
stdim st, NCRYPT_SSL_FUNCTION_TABLE ; NSTRUCT 変数を確保