Skip to content

Commit

Permalink
1.0.0.7r
Browse files Browse the repository at this point in the history
QRCS-CORP committed Apr 29, 2019
1 parent 7b01f7a commit ccd5e8e
Showing 328 changed files with 9,003 additions and 2,305 deletions.
22 changes: 18 additions & 4 deletions CEX/AsymmetricTransforms.cpp
Original file line number Diff line number Diff line change
@@ -26,8 +26,14 @@ std::string AsymmetricTransformConvert::ToName(AsymmetricTransforms Enumeral)
case AsymmetricTransforms::MLWES4Q7681N256:
name = std::string("MLWES4Q7681N256");
break;
case AsymmetricTransforms::MPKCS1M12T62:
name = std::string("MPKCS1M12T62");
case AsymmetricTransforms::MPKCS1N4096T62:
name = std::string("MPKCS1N4096T62");
break;
case AsymmetricTransforms::MPKCS1N6960T119:
name = std::string("MPKCS1N6960T119");
break;
case AsymmetricTransforms::MPKCS1N8192T128:
name = std::string("MPKCS1N8192T128");
break;
case AsymmetricTransforms::NTRUS1LQ4591N761:
name = std::string("NTRUS1LQ4591N761");
@@ -86,9 +92,17 @@ AsymmetricTransforms AsymmetricTransformConvert::FromName(std::string &Name)
{
tname = AsymmetricTransforms::MLWES4Q7681N256;
}
else if (Name == std::string("MPKCS1M12T62"))
else if (Name == std::string("MPKCS1N4096T62"))
{
tname = AsymmetricTransforms::MPKCS1N4096T62;
}
else if (Name == std::string("MPKCS1N6960T119"))
{
tname = AsymmetricTransforms::MPKCS1N6960T119;
}
else if (Name == std::string("MPKCS1N8192T128"))
{
tname = AsymmetricTransforms::MPKCS1M12T62;
tname = AsymmetricTransforms::MPKCS1N8192T128;
}
else if (Name == std::string("NTRUS1LQ4591N761"))
{
24 changes: 16 additions & 8 deletions CEX/AsymmetricTransforms.h
Original file line number Diff line number Diff line change
@@ -41,35 +41,43 @@ enum class AsymmetricTransforms : byte
/// <summary>
/// The S1 parameters (Medium Security) A finite field of 12 and an error correction capability of 62
/// </summary>
MPKCS1M12T62 = 7,
MPKCS1N4096T62 = 7,
/// <summary>
/// The S2 parameters (Medium-High Security) A finite field of 13 and an error correction capability of 119
/// </summary>
MPKCS1N6960T119 = 8,
/// <summary>
/// The S3 parameters (High Security) A finite field of 13 and an error correction capability of 128
/// </summary>
MPKCS1N8192T128 = 9,
/// <summary>
/// The S1 parameters; (High Security) The rounded product form L-Prime, modulus of 4591 with 761 coefficients
/// </summary>
NTRUS1LQ4591N761 = 8,
NTRUS1LQ4591N761 = 10,
/// <summary>
/// The S2 parameters; (High Security) The rounded quotient form S-Prime, modulus of 4591 with 761 coefficients
/// </summary>
NTRUS2SQ4591N761 = 9,
NTRUS2SQ4591N761 = 11,
/// <summary>
/// The S1 parameters; (High Security) A modulus of 12289 with 1024 coefficients
/// </summary>
RLWES1Q12289N1024 = 10,
RLWES1Q12289N1024 = 12,
/// <summary>
/// A modulus of 12289 with 2048 coefficients
/// </summary>
RLWES2Q12289N2048 = 11,
RLWES2Q12289N2048 = 13,
/// <summary>
/// The S1 parameters; (Medium Security) The Sphincs SHAKE128, F256 parameter set
/// </summary>
SPXS128F256 = 12,
SPXS128F256 = 14,
/// <summary>
/// The S2 parameters; (High Security) The Sphincs SHAKE256, F256 parameter set
/// </summary>
SPXS256F256 = 13,
SPXS256F256 = 15,
/// <summary>
/// The S3 parameters; (Highest Security) The experimental Sphincs SHAKE512, F256 parameter set
/// </summary>
SPXS512F256 = 14
SPXS512F256 = 16
};

class AsymmetricTransformConvert
8 changes: 4 additions & 4 deletions CEX/Documentation.h
Original file line number Diff line number Diff line change
@@ -15,19 +15,19 @@ CEX is a library built for safety, speed, and maximum security.
This help package contains details on the cryptographic primitives used in the library, their uses, and code examples.
\section road_map Road Map
The current version is <B>v1.0.0.7q</B> (A7 version), which are the major, minor, patch, and release codes, and the update segment letter. \n
The current version is <B>v1.0.0.7r</B> (A7 version), which are the major, minor, patch, and release codes, and the update segment letter. \n
\brief
\author John Underhill
\version v1.0.0.7q
\date April 07, 2019
\date April 29, 2019
\copyright GPL version 3 license (GPLv3)
<B>Trajectory</B> \n \n
The current version is v1.0.0.7q (A7 version), which are the major, minor, patch, and release codes. \n \n
The current version is v1.0.0.7r (A7 version), which are the major, minor, patch, and release codes. \n \n
<B>Current Release v1.0.0.7q (version A7):</B> \n
<B>Current Release v1.0.0.7r (version A7):</B> \n
The wide-block Rijndael-256 based authenticated stream cipher RCS, and the AES-NI version ACS \n
The Dilithium asymmetric signature scheme \n
18 changes: 18 additions & 0 deletions CEX/IPrng.h
Original file line number Diff line number Diff line change
@@ -116,6 +116,24 @@ class IPrng
/// Reset the generator instance
/// </summary>
virtual void Reset() = 0;

/// <summary>
/// Fill a standard array or vector with pseudo-random bytes
/// </summary>
///
/// <param name="Output">The destination standard-vector to fill</param>
/// <param name="Offset">The starting offset withing the destination vector</param>
/// <param name="Elements">The number of elements to fill with pseudo-random values</param>
template<typename Array>
void Fill(Array &Output, size_t Offset, size_t Elements)
{
const size_t ELMSZE = sizeof(Array::value_type);
std::vector<byte> smp(ELMSZE * Elements);

Generate(smp, 0, smp.size());
MemoryTools::Copy(smp, 0, Output, Offset, smp.size());
MemoryTools::Clear(smp, 0, smp.size());
}
};

NAMESPACE_PRNGEND
Loading
Oops, something went wrong.

0 comments on commit ccd5e8e

Please sign in to comment.