background preloader

SHA hash functions

SHA hash functions
In cryptography, SHA-1 is a cryptographic hash function designed by the United States National Security Agency and is a U.S. Federal Information Processing Standard published by the United States NIST.[2] SHA-1 produces a 160-bit (20-byte) hash value. A SHA-1 hash value is typically rendered as a hexadecimal number, 40 digits long. SHA stands for "secure hash algorithm". The four SHA algorithms are structured differently and are named SHA-0, SHA-1, SHA-2, and SHA-3. SHA-1 is the most widely used of the existing SHA hash functions, and is employed in several widely used applications and protocols. In 2005, cryptanalysts found attacks on SHA-1 suggesting that the algorithm might not be secure enough for ongoing use.[3] NIST required many applications in federal agencies to move to SHA-2 after 2010 because of the weakness.[4] Although no successful attacks have yet been reported on SHA-2, it is algorithmically similar to SHA-1. The SHA-1 hash function[edit] denotes addition modulo 232. or

This is a fast software implementation in C of the FIPS 180-2 hash algorithms SHA-224, SHA-256, SHA-384 and SHA-512. The code is distributed under the BSD license. For each algorithm the implementation has been verified with the NIST test vectors and with the additional vectors provided by Aaron D. Gifford. News: February 2, 2007: Add new optimizations and minor bug fix. May 23, 2005: Include support of SHA-224. April 30, 2005: First release. Download: sha2.tar.gz github: Users: This SHA-2 version is used in Adobe AIR (see license file), in Cisco ASA 5500 Series Software (license), in HP Compliance Log Warehouse (license), or in Yahoo! Compilation options: There is an UNROLL_LOOPS option which is disabled by default. Performances: SHA-256 can achieve hashing at 27 cycles per byte for long size data on a Pentium 4 with the Intel compiler. Arch: Pentium 4 (Prescott), compiler: icc 8.1, compiler options: -O2 -xP -ip, software options: -DUNROLL_LOOPS Portability:

/cfAES: Compact Framework and Rijndael / AES 7/19/2004 Introduction the table below shows the different crypto algorithms listed on the left, and where they live. X means that it is supported, 0 means partial support. you can see that System.Security.Cryptography for CFv2 is going to lack many algorithms compared to the desktop. OpenNETCF 1.2 and the /cfAes library are intended to be used together, to provide almost all of the crypto functionality of .NET 2005 (desktop) RijndaelManaged, RijndaelCryptoServiceProvider 1st off, i think it is pronounced 'rain doll' :) i'm not certain of the history, but Rijndael and AES are related. something to the effect of Rijndael being the candidate for what is now known as AES. AES, EBC, NoPadding, KeyWrap the Rijndeal implementations above were tested against WSE 2.0. TripleDesEx, NoPadding, KeyWrap the TripleDES KeyWrap implementation was brought over from the WSE bits (where it was tested). SHA256Managed, SHA384Managed, SHA512Managed, SHA1Managed SecureString

CertCreateSelfSignCertificate Function Syntax PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate( _In_opt_ HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProvOrNCryptKey, _In_ PCERT_NAME_BLOB pSubjectIssuerBlob, _In_ DWORD dwFlags, _In_opt_ PCRYPT_KEY_PROV_INFO pKeyProvInfo, _In_opt_ PCRYPT_ALGORITHM_IDENTIFIER pSignatureAlgorithm, _In_opt_ PSYSTEMTIME pStartTime, _In_opt_ PSYSTEMTIME pEndTime, PCERT_EXTENSIONS pExtensions ); Parameters hCryptProvOrNCryptKey [in, optional] pSubjectIssuerBlob [in] dwFlags [in] A set of flags that override the default behavior of this function. pKeyProvInfo [in, optional] If the pKeyProvInfo parameter is not NULL, the corresponding values are set in the CERT_KEY_PROV_INFO_PROP_ID value of the generated certificate. pSignatureAlgorithm [in, optional] pStartTime [in, optional] pEndTime [in, optional] pExtensions [optional] Return value Requirements See also

CSP: du natif au managé Afin de gérer les objets cryptographiques dans Windows, Microsoft met à la disposition des développeurs la Crypto API qui est loin d'être simple d'utilisation. Fournir une interface plus simple à utiliser à partir du Framework .Net n'était pas une chose facile, mais Microsoft s'est quand même lancé dans l'exercice avec .Net 1 et a renforcé sa position avec le Framework 2.0. Premier constat : tout ce qui est faisable en natif ne l'est pas en managé, des choix ont du être fait ! Pour rappel, la CryptoAPI est utilisée au travers des « Cryptographic Service Provider », composants fournit par Microsoft dans Windows ou des externes tels que des fournisseurs tiers de carte à puce. Ils gèrent la génération, le stockage, les droits d'accès, et l'utilisation d'objets cryptographiques. Les CSP masquent l'implémentation des algorithmes, ils sont interchangeables et l'on peut suivant sa configuration utiliser un CSP logiciel ou matériel.

Cryptographie appliquée en .Net : La gestion des certificats Lors du précédent article nous avons vu comment le Framework gère les clés de chiffrement. Les clés isolées de tout contexte rendent énormément de service, mais lorsqu'elles sont attachées à un certificat électronique, elles peuvent être exploitées au maximum de leur potentiel. Pour simplifier, je vais reprendre une définition de certificat que l'on peut trouver sur Wikipedia : Un certificat électronique est une carte d'identité électronique dont l'objet est d'identifier un utilisateur ou un équipement informatique. Le Framework représente les certificats par la classe X509Certificate2, une spécialisation de la classe X509Certificate déjà présente dans le Framework 1.1. Les certificats sont organisés dans Windows dans des « magasins », chaque magasin possède une portée (utilisateur local, machine) et une fonction (certificats de l'utilisateur, certificats des autorités de confiance...).

Windows 2000 Server, PKI and the nCipher Hardware Security Module Published: April 7, 2001 By David Cross, Microsoft Corporation, and William A. Franklin, nCipher, Inc. Abstract The Microsoft Windows 2000 operating system provides users with an integrated public key infrastructure (PKI) that allows them to establish and maintain security - including cryptographic security. This paper examines how nCipher's hardware security modules (HSMs) and Windows 2000 Server work together to perform routine cryptographic and PKI operations. On This Page Introduction Windows 2000 PKI Hardware Security Module CryptoAPI nCipher Security World HSM Installation Procedures Additional Information Introduction The implementation of a public key infrastructure (PKI) is necessary to support many new technologies - this includes encrypting files and exchanging digitally-signed, encrypted e-mail with external partners and customers. Benefits nCipher HSMs provide several benefits to Microsoft Windows 2000 Certificate Server installations. An Administrative Guide Best Practices

Credential Management with the .NET Framework 2.0 Kenny Kerr January 2006 Applies to: Microsoft .NET Framework 2.0 .NET Framework Security Windows XP Summary: Get an introduction to the Credential Management API that includes functions for user interface handling and lesser-known functions for managing a user's credential set. Download the associated KerrCredentialsSample.exe code sample. Download the credential management for C++ developers. (26 printed pages) Contents IntroductionPrompting For CredentialsPrompting for Credentials from Managed CodeTool: PromptForCredentials BuilderA SecureString PrimerThe Credential SetUsing the Credential Set from Managed CodeTool: Credential Set ManagerConclusion Introduction Managing user credentials is hard work. Since the release of Windows XP in 2001, Windows has included a Credential Management API for managing user credentials. Let's get started! Prompting For Credentials The dialog box can display a check box providing the user with the option of saving the credential. Now on to managed code!

La signature électronique avec .Net - Club des décideurs et professionnels en Informatique Avant de signer il nous faut un certificat. Voyons comment accéder à nos certificats avec .Net. Première chose, il nous faut un accès au magasin de certificats. Pour cela on utilise la classe X509Store. Pour accéder au magasin de l'utilisateur courant il suffit donc de faire. X509Store store = new X509Store(StoreLocation.CurrentUser); Pour accéder au dossier personnel du magasin de l'utilisateur courant on utilisera. X509Store store = new X509Store(StoreName.My); Il est possible de combiner les deux. X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine); Maintenant que nous avons accès à notre magasin, il faut l'ouvrir en indiquant la façon de l'ouvrir avec l'énumération OpenFlags. store.Open(OpenFlags.ReadOnly); Une fois ouvert, on va pouvoir accéder à la liste des certificats via la propriété Certificates. foreach (X509Certificate2 cert in store.Certificates) { Console.WriteLine(string.Format("Délivré à {0} par {1}", cert.SubjectName.Name, cert.IssuerName.Name));} 3.2.1. <?

Crypto++ Library 5.6.0 - a Free C++ Class Library of Cryptographic Schemes How can I generate a hash value for a file or folder? A. You might encounter situations in which you want to ensure that a file is the same version and has the same content as another file (e.g., when you send a file to someone, you want to make sure it hasn't been corrupted or altered). A hash is an alphanumeric string that's generated according to a file's contents. If the file has been changed in any way, the hash value changes as well. Microsoft created a utility to generate hash values, which you can download at fciv d:\temp\yodapepsi.mpg After you enter the command, you'll see the following on-screen message, the generated hash value, and the corresponding filename: // // File Checksum Integrity Verifier version 2.05. // 253f066ffa7c50e1e03fa588f23e3230 d:\temp\yodapepsi.mpg To generate hashes for every file in a folder, simply specify the folder name, as this example shows:

Related: