public void CompliantGenerateKey() { var ec1 = new ECDiffieHellmanCng(); ec1.GenerateKey(ECCurve.NamedCurves.brainpoolP224r1); ec1.GenerateKey(ECCurve.NamedCurves.nistP256); var ec2 = new ECDsaCng(); ec2.GenerateKey(ECCurve.NamedCurves.brainpoolP256r1); ec2.GenerateKey(ECCurve.NamedCurves.nistP384); var ec3 = new ECDsaOpenSsl(); ec3.GenerateKey(ECCurve.NamedCurves.brainpoolP384t1); ec3.GenerateKey(ECCurve.NamedCurves.nistP521); }
public void NoncompliantGenerateKey() { var ec1 = new ECDiffieHellmanCng(); ec1.GenerateKey(ECCurve.NamedCurves.brainpoolP160r1); // Noncompliant {{Use a key length of at least 224 bits for EC cipher algorithm.}} var ec2 = new ECDsaCng(); ec2.GenerateKey(ECCurve.NamedCurves.brainpoolP160t1); // Noncompliant {{Use a key length of at least 224 bits for EC cipher algorithm.}} var ec3 = new ECDsaOpenSsl(); ec3.GenerateKey(ECCurve.NamedCurves.brainpoolP192t1); // Noncompliant {{Use a key length of at least 224 bits for EC cipher algorithm.}} }