I want to derive a secret key using Elliptic Curve Secret Value Derivation Primitive (ECSVDP-DH) with Powershell langage using .NET and NO additional hash function for KDF.
I have try ECDiffieHellmanCng.DeriveKeyMaterial but this method seems to use additionnal KDF with hash function by default and hash algorithm SHA-256 for the output.
However, instead of exposing the secret agreement directly, the ECDiffieHellmanCng class does some post-processing on the agreement before providing the value. This post processing is referred to as the key derivation function (KDF); you can select which KDF you want to use and set its parameters through a set of properties on the instance of the Diffie-Hellman object.
I can see this Method ECDiffieHellmanCng.DeriveSecretAgreementHandle from System.Security.Cryptography.ECDiffieHellmanCng namespace but I don't understand how to use this pointer.
cryptography.ecdiffiehellmancng.derivesecretagreementhandle
The DeriveSecretAgreementHandle method overloads are for advanced users who need a handle to the raw secret agreement instead of the key material. The secret agreement handle can be used in platform invoke calls to perform any work that is not wrapped by the ECDiffieHellmanCng class.
I search this similar function in .NET bouncycastle ECDHBasicAgreement calculateAgreement or nodejs elliptic derive()
I have found also this C++ function which seems to match but I'm looking for an equivalent in .NET nf-bcrypt-bcryptsecretagreement
Any help is welcome, thanks.