Commit Graph
27 Commits
Author SHA1 Message Date
Rodrigo Kumpera bbb7592661 Make the Crypto stack work with Full AOT.
* System.Security.Cryptography.*cs: To make Crypto work with
	Full AOT we remove the usage of providers and reflection. We hardcode
	the default algorithms for hashing, rng and symmetric cyphers.
2012-11-06 18:18:16 -05:00
Miguel de Icaza 3c39ac4586 Jumbo patch for NET_2_0, mscorlib is now clean
svn path=/trunk/mcs/; revision=145621
2009-11-06 22:23:59 +00:00
Sebastien Pouliot 2e04d92d70 2008-04-17 Sebastien Pouliot <[email protected]>
* AsymmetricAlgorithm.cs: Add shared GetNamedParam helper method.
	* DSA.cs, RSA.cs: Rework FromXmlString to be more "careless" like
	MS implementation. Fix #355464


svn path=/trunk/mcs/; revision=101003
2008-04-17 14:56:26 +00:00
Sebastien Pouliot 6167c93063 2005-11-22 Sebastien Pouliot <[email protected]>
* DSAManaged.cs: Don't output J in the XML if it's not exported (i.e.
	if it wasn't imported too but instead calculated from the other 
	parameters ;-).


svn path=/trunk/mcs/; revision=53356
2005-11-22 19:05:17 +00:00
Sebastien Pouliot ccfef2f152 2005-06-10 Sebastien Pouliot <[email protected]>
* all: 2.0 beta2 fixes, i.e. mostly added [ComVisible(true)]


svn path=/trunk/mcs/; revision=45759
2005-06-10 14:42:08 +00:00
Raja R Harinath e0cfa4925e Set svn:eol-style=native, delete svn:executable.
Fix line endings of System/Decimal.cs (only actual "change" in text, to force recompile of mscorlib to reflect changes in decimal constant handling in the compiler)


svn path=/trunk/mcs/; revision=44558
2005-05-16 12:23:26 +00:00
Sebastien Pouliot 93205ccd04 2005-02-10 Sebastien Pouliot <[email protected]>
* DSA.cs: Weekly fix to case where DSAParameters.Counter is 0 :-(
	A new unit test was added for this specific case so it's hopefully
	the last fix for this. Fixed exception reporting to match NET_2_0.


svn path=/trunk/mcs/; revision=40406
2005-02-10 16:09:34 +00:00
Sebastien Pouliot 166bd46db1 2005-01-30 Sebastien Pouliot <[email protected]>
* DSA.cs: Really fixed case where DSAParameters.Counter is 0.


svn path=/trunk/mcs/; revision=39809
2005-01-30 20:00:11 +00:00
Sebastien Pouliot 0002a9258c 2005-01-21 Sebastien Pouliot <[email protected]>
* DSA.cs: Handle the case where DSAParameters.Counter is 0.


svn path=/trunk/mcs/; revision=39316
2005-01-21 18:01:43 +00:00
Sebastien Pouliot 5fb1ea83ee 2004-08-08 Sebastien Pouliot <[email protected]>
* CspProviderFlags.cs: Fixed new enums values.
	* DSA.cs: Fixed #if for constructor visibility.
	* CryptoAPITransform.cs: Removed constructor for NET_2_0 profile.

svn path=/trunk/mcs/; revision=30892
2004-07-08 17:54:24 +00:00
Sebastien Pouliot 7c32587fbf 2004-07-07 Sebastien Pouliot <[email protected]>
* CryptoAPITransform.cs: Added the new Reset method for NET_2_0. This
	is a NOP as this class isn't used by Mono (all crypto transforms are
	managed).
	* CryptographicException.cs: Added _Exception interface for NET_2_0
	profile.
	* CspProviderFlags.cs: Added new enum's members for NET_2_0.
	* DSA.cs: Changed constructor to protected for NET_2_0. It is now
	possible to inherit from DSA in other assemblies.
	* DSACryptoServiceProvider.cs: NET_2_0 cleanup. Added interface
	ICspAsymmetricAlgorithm (stub),	removed (unrequired) LegalKeySizes
	override, fixed visibility of PublicOnly property.
	* HMACSHA1.cs: Fixed #if for NET_2_0 profile.
	* KeyNumber.cs: Fixed values for new enum in Fx 2.0.
	* MACTripleDES.cs: Added new Padding property to NET_2_0 profile.
	* ProtectedData.cs: Added missing private constructor.
	* ProtectedMemory.cs: Added missing private constructor.
	* RC2CryptoServiceProvider.cs: Added UseSalt property to NET_2_0
	profile. Salt usage must be added to the transforms.
	* RIPEMD160Managed.cs: Removed unrequired [CLSCompliant] attributes.
	* RSACryptoServiceProvider.cs: NET_2_0 cleanup. Added interface
	ICspAsymmetricAlgorithm (stub),	fixed visibility of PublicOnly
	property.
	* RijndaelManaged.cs: Use the new RijndaelManagedTransform for Fx 2.0.
	* RijndaelManagedTransform.cs: New. Class is now public in Fx 2.0.

svn path=/trunk/mcs/; revision=30833
2004-07-07 14:02:27 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Sebastien Pouliot f40db6fe6c 2004-05-07 Sebastien Pouliot <[email protected]>
* CipherMode.cs: Moved XML comments to monodoc.
	* CryptoConfig.cs: Changed Array.Copy to Buffer.BlockCopy.
	* CryptoStream.cs: Changed Array.Copy to Buffer.BlockCopy.
	* DSA.cs: Changed Array.Copy to Buffer.BlockCopy.
	* ICryptoTransform.cs: Moved XML comments to monodoc.
	* PasswordDeriveBytes.cs: Changed Array.Copy to Buffer.BlockCopy.
	* FromBase64Transform.cs: Moved XML comments to monodoc.

svn path=/trunk/mcs/; revision=26907
2004-05-07 11:35:22 +00:00
Sebastien Pouliot e7e787e337 2004-04-28 Sebastien Pouliot <[email protected]>
* DSA.cs: Moved XML comments to monodoc. Added globalization to
	exceptions. Already had 100% coverage.
	* DSAParameters.cs: Moved XML comments to monodoc.
	* DSASignatureDeformetter.cs: Added globalization to exceptions.
	Limited catch to expected exception. Already had 100% coverage.
	* DSASignatureFormatter.cs: Added globalization to exceptions. Limited
	catch to expected exception. Already had 100% coverage.

svn path=/trunk/mcs/; revision=26135
2004-04-28 12:11:16 +00:00
Bernie Solomon bf84c822b7 2004-04-08 Bernie Solomon <[email protected]>
* DSA.cs: Use Mono.Security.BitConverterLE

svn path=/trunk/mcs/; revision=25241
2004-04-08 22:06:45 +00:00
Atsushi Eno 0b04ce162c 2004-03-09 Atsushi Enomoto <[email protected]>
* DSA.cs : fixed incorrectly modified catch for debugging.

svn path=/trunk/mcs/; revision=23836
2004-03-09 18:11:34 +00:00
Atsushi Eno 094a4d98d2 2004-03-09 Atsushi Enomoto <[email protected]>
* DSA.cs : In ToXmlString(), sequence of Seed and PgenCounter is
	  optional.

svn path=/trunk/mcs/; revision=23835
2004-03-09 17:38:01 +00:00
Sebastien Pouliot 0add9abe32 2003-07-05 Sebastien Pouliot <[email protected]>
* AsymmetricAlgorithm.cs: Removed AsymmetricParameters (IReader) class.
	Now uses the new Mono.Xml.SecurityParser (xml -> SecurityElement)
	* CryptoConfig.cs: Removed CorlibHandler and CorlibReader classes. Now
	uses the new Mono.Xml.SecurityParser (xml -> SecurityElement)
	* DSA.cs: Removed DSAHandler (IHandler) class. Now uses the new
	Mono.Xml.SecurityParser (xml -> SecurityElement)
	* DSACryptoServiceProvider.cs: Added ObjectDisposedException support
	and fixed bugs found in new unit tests.
	* RSA.cs: Removed DSAHandler (IHandler) class. Now uses the new
	Mono.Xml.SecurityParser (xml -> SecurityElement)
	* RSACryptoServiceProvider.cs: Added ObjectDisposedException support
	and fixed bugs found in new unit tests.

svn path=/trunk/mcs/; revision=15971
2003-07-06 02:48:57 +00:00
Sebastien Pouliot 66e393eccc 2003-02-08 Sebastien Pouliot <[email protected]>
* Changes to refer Mono.Xml

svn path=/trunk/mcs/; revision=11353
2003-02-08 16:31:12 +00:00
Sebastien Pouliot 8f7ce12d41 2002-12-31 Sebastien Pouliot <[email protected]>
* AsymmetricAlgorithm.cs: Removed ValidKeySize (method only present
	in SymmetricAlgorithm).
	* DSA.cs: Change ZeroizePrivateKey from protected to internal.
	* DSACryptoServiceProvider.cs: Added some case where we need to check
	for keypairGenerated.
	* RSA.cs: Change ZeroizePrivateKey from protected to internal.
	* RSACryptoServiceProvider.cs: Key were never generated with the default
	(no parameter) constructor. Now checks for keypairGenerated in methods.
	* SignatureDescription.cs: Added CreateDeformatter in RSAPKCS1SHA1-
	SignatureDescription to please corcompare (it just call it's ancestor).

svn path=/trunk/mcs/; revision=10019
2002-12-31 17:33:06 +00:00
Sebastien Pouliot 7613418766 2002-11-16 Sebastien Pouliot <[email protected]>
* AsymmetricAlgorithm.cs: Added internal class AsymmetricParameters
	(which implements the IReader interface for MiniParser). Corrected
	Dispose declaration.
	* BigInteger.cs: New. Internal class for handling BIG integers for
	asymmetric crypto (both RSA and DSA). Thanks to Chew Keong TAN !
	* CryptoConfig.cs: Added XMLDSIG URLs in CreateFromName.
	Will dynamically load System.Security.dll, when required,
	to return instance of those classes. Also CryptoConfig can now
	create any object (e.g. System.IO.MemoryStream) !
	* DSA.cs: Added internal class DSAHandler (which implements IHandler
	interface for MiniParser) to import DSA keypairs from XML strings.
	* DSACryptoServiceProvider.cs: Crypto fully implemented using
	BigInteger. Key generation (group) is VERY long.
	* MiniParser.cs: New. Minimal XML parser by Sergey Chaban. Used to
	import keypairs in XML strings.
	* SignatureDescription.cs: Removed local CreateFromName (to use
	CryptoConfig - which actually can create anything). Added internal
	classes DSASignatureDescription and RSAPKCS1SHA1SignatureDescription.

svn path=/trunk/mcs/; revision=9020
2002-11-17 03:38:23 +00:00
Sebastien Pouliot b443cb3648 2002-10-19 Sebastien Pouliot <[email protected]>
* SymmetricAlgorithm.cs: Added new class SymmetricTransform to avoid
	duplicating CipherMode (currently ECB, CBC) and PaddingMode functionalities
	in every crytographic algorithm implementation.
	* RijndaelManaged.cs: Added the RjindaelTransform class (inherited
	from SymmetricTransform) based the old RijndaelImpl / RijndaelController
	code. Fixed encryption for block size 192, 256, there is still a problem
	decrypting block size 192, 256. Unrolled some loops + littl'optimizations
	* PKCS1MaskGenerationMethod.cs: Removed Array.Reverse in I2OSP to be
	compatible with MS implementation (however we are now failing the PKCS#1
	test vector) + added some more checks (null, overflow, ...)
	* AsymmetricAlgorithm.cs: Commented XMLDocument stuff to end the cyclic
	dependency (corlib->System.Xml->corlib)
	* RSA.cs: Commented FromXmlString stuff to end the cyclic dependency
	* DSA.cs: Commented FromXmlString stuff to end the cyclic dependency
	* RC2.cs: Create using CryptoConfig
	* TripleDES.cs: Marked class public. Added LegalKeySizes and LegalBlockSizes

svn path=/trunk/mcs/; revision=8392
2002-10-19 15:32:57 +00:00
Sebastien Pouliot d1753e90d0 2002-10-12 Sebastien Pouliot <[email protected]>
* DSA.cs: changed constructor to public from internal (like MS)
	* HashAlgorithm.cs: Completed ComputeHash methods
	* SHA1.cs: Added HashSizeValue = 160

svn path=/trunk/mcs/; revision=8208
2002-10-13 03:13:08 +00:00
Sebastien Pouliot 22fa9bf079 2002-10-10 Sebastien Pouliot <[email protected]>
* AsymmetricAlgorithm.cs: Inherit from IDisposable, common support from XML import
	* DSA.cs: FromXmlString() keypair import, Create() using CryptoConfig
	* RSA.cs: FromXmlString() keypair import, Create() using CryptoConfig
	* DSACryptoServiceProvider.cs: Added Dispose()

svn path=/trunk/mcs/; revision=8159
2002-10-11 03:20:52 +00:00
Piers Haken 84187bf9a6 fixed member accessibility to match MS (corcompare).
svn path=/trunk/mcs/; revision=3531
2002-04-01 06:07:43 +00:00
Ravi Pratap M 76218d8771 2002-01-05 Ravi Pratap <[email protected]>
* CryptoAPITransform.cs, DESCryptoProvider.cs : MonoTODO attribute
	decoration.

	* HashAlgorithm.cs, MD5.cs, SHA1.cs, SHA256.cs, SHA384.cs : Ditto.

	* SHA512.cs, SymmetricAlgorithm.cs, ToBase64Transform.cs,
	AsymmetricAlgorithm.cs, CryptoStream.cs, DSA.cs, DSASignatureDeformatter.cs,
	DSASignatureFormatter.cs, SignatureDescription.cs : Ditto.

svn path=/trunk/mcs/; revision=1848
2002-01-05 06:10:24 +00:00
Thomas Neidhart f0b7d41fb9 * Initial versions of several classes, including
DSA base classes and CSP base classes

svn path=/trunk/mcs/; revision=1141
2001-10-11 15:30:20 +00:00