Taggad: openssl

.SE:s Internetfonden finansierar tre kryptoprojekt

I år delar .SE:s Internetfonden ut 12 miljoner kronor till fristående, icke-kommersiella projekt som verkar för en positiv utveckling av Internet i Sverige. I den senaste ansökningsomgången fick 14 projekt dela på nästan 2,8 miljoner kronor.

Sedan starten av Internetfonden år 2004 har över 150 projekt finansierats och i år får 14 projekt dela på nästan 2,8 miljoner kronor.

Av årets projekt så hittade vi tre stycken som ser att direkt vara relevant för Kryptera.se:s läsare:

Better-Than-Nothing-Security

Michael Cardell Widerkrantz, Malmö

är teknik för att på IP-nivå automatiskt kryptera, skydda integritet och garantera att vi fortfarande kommunicerar med samma motpart.

Beviljad summa: 200 000 kronor
Hemsida: http://hack.org/mc/hacks/btns/

Transparent

Björn Påhlsson, Malmö

Beskrivning av projektet: Underlätta användningen av genom att skapa ett automatiskt system som kan hantera kryptering av e-post utan slutanvändarens inblandning.

Beviljad summa: 70 000 kronor

Forskningsuppdrag om DANE för

Chalmers Tekniska Högskola AB, Göteborg

Beskrivning av projektet: Implementering av krypterad säkerhet i OpenSSL så att det kan användas både i existerande programvaror och med tiden inlemmas i OpenSSL för att öka säkerheten på Internet.

Beviljad summa: 260 000 kronor

Mer information om Internetfonden:
www.internetfonden.se

Uppdatering: Fixat ett fel gällande BTNS.

Allvarlig sårbarhet identifierad i OpenSSL

som jobbar på med säkerhet har identifierat en allvarlig i -funktionen _d2i_read_bio. Som funktionsnamnet antyder så används den för läsning av -information, och inte konstigt att sårbarheter identifieras i denna typ av funktioner då standarden är en vildvuxen skog.

Enligt den säkerhetsnotis (se nedan) som skickats ut så är /-implementationer ej sårbara men det finns en viss chans att någon implementation använder sig av och kan då vara sårbar.

OpenSSL-teamet vädjar till uppgradering till versionerna 1.0.1a, 1.0.0i eller 0.9.8v.

Källa: https://openssl.org/news/secadv_20120419.txt

Sårbarhet i OpenSSL:s ECDSA-implementation

En ny (timing attack) har uppdagats i :s implementation av Elliptic Curve Digital Signature Algorithm (). Med hjälp av denna attack så är det möjligt att läsa ut den privata nyckeln via exempelvis protokollet . Sårbarheten hittades av Billy Bob Brumley och Nicola Tuveri:

”For over two decades, timing attacks have been an active area of research within applied cryptography. These attacks exploit cryptosystem or protocol implementations that do not run in constant time. When implementing an elliptic curve cryptosystem that provides side-channel resistance, the scalar multiplication routine is a critical component. In such instances, one attractive method often suggested in the literature is Montgomery’s ladder that performs a fixed sequence of curve and field operations.

This paper describes a timing attack vulnerability in OpenSSL’s ladder implementation for curves over binary fields. We use this vulnerability to steal the private key of a TLS server where the server authenticates with ECDSA signatures. Using the timing of the exchanged messages, the messages themselves, and the signatures, we mount a lattice attack that recovers the private key.”

Läs även:

Remote Timing Attacks are Still Practical:
http://eprint.iacr.org/2011/232.pdf

Ny sårbarhet i OpenSSL

En ny har identifierats i OpenSSL av Googles . Om ett felaktigt formaterat ClientHello-meddelande tas emot över nätverket så kan krascha alternativt så kan minne läckas till en angripare.

OpenSSL har nu åtgärdat felet och släppt version 1.0.0d.

Se mer https://www.openssl.org/news/secadv_20110208.txt

OpenSSL – Sårbarhet identifierad

Säkerhetsforskaren har identifierat en i OpenSSL version 1.x. Buggen finns i funktionen 3_get_key_exchange och kan med stor sannolikhet utnyttjas fjärrmässigt (över Internet). Som tur är så har många operativsystem såsom ej uppdaterat till 1.x versionen ännu utan är kvar på 0.9.x.

Ny version av OpenSSL

OpenSSL är ett av världens mest använda krypteringsbibliotek och finns inbyggt i allt från satelliter till bilar och tv-spelskonsoller. Nu har det kommit en uppdatering som får versionsnummer 0.9.8o samt 1.0.0a som åtgärdar ett antal säkerhetsbrister men även innehåller ett antal nya funktioner:

  • Stöd för TLS v1.1
  • Fixar för två säkerhetsbrister, se mer nedan.
  • Stöd för CMAC

Säkerhetbristerna är enligt följande:

CMS structures containing OriginatorInfo are mishandled this can write to invalid memory addresses or free up memory twice.

When verification recovery fails for RSA keys an uninitialised buffer with an undefined length is returned instead of an error code.

Mer information finns som vanligt på OpenSSL.org

OpenSSL version 1.0.0 är nu ute

Nu kommer äntligen OpenSSL i en version ett-utgåva. Detta betyder troligtvis att alla år av utveckling nu gett resultat och utvecklarna känner att håller en hög kvalité nog att släppa en version 1.

o RFC3280 path validation: sufficient to process PKITS tests.
o Integrated support for PVK files and keyblobs.
o Change default private key format to PKCS#8.
o CMS support: able to process all examples in RFC4134
o Streaming encode support for PKCS#7 and CMS.
o Multiple signer and signer add support for PKCS#7 and CMS.
o ASN1 printing support.
o Whirlpool hash algorithm added.
o RFC3161 time stamp support.
o New generalised public key API supporting ENGINE based algorithms.
o New generalised public key API utilities.
o New ENGINE supporting GOST algorithms.
o / GOST ciphersuite support.
o PKCS#7 and CMS GOST support.
o RFC4279 PSK ciphersuite support.
o Supported points format extension for ECC ciphersuites.
o -with-SHA224/256/384/512 signature types.
o dsa-with-SHA224 and dsa-with- signature types.
o Opaque PRF Input TLS extension support.
o Updated time routines to avoid OS limitations.

OpenSSL hittas som vanligt här: http://openssl.org/

OpenSSL säkerhetsuppdatering

En ny version av det populära krypteringsbiblioteket OpenSSL finns nu ute. Denna version åtgärdar ett säkerhetsproblem som identifierats:

”Record of death” vulnerability in 0.9.8f through 0.9.8m
================================================================

In connections, certain incorrectly formatted records can cause an OpenSSL client or server to crash  due to a read attempt at NULL.

Affected versions depend on the C compiler used with OpenSSL:

- If ‘short’ is a 16-bit integer, this issue applies only to OpenSSL 0.9.8m.
- Otherwise, this issue applies to OpenSSL 0.9.8f through 0.9.8m.

Users of OpenSSL should update to the OpenSSL 0.9.8n release, which contains a patch to correct this issue. If upgrading is not immediately possible, the source code patch provided in this advisory should be  applied.

Bodo Moeller and Adam Langley () have identified the vulnerability and prepared the fix.

OpenSSL finns som vanligt att ladda ner på openssl.org

OpenSSL version 0.9.8m släppt

En ny version av finns nu ute som åtgärdar den senaste SSL/TLS-buggen genom att implementera RFC5746.

OpenSSL kan som vanligt laddas hem här:

http://www.openssl.org/source/

OpenSSL version 0.9.8j släppt

En ny version av finns nu ute att tanka hem från openssl.org som innehåller en mycket viktig säkerhetsfix:

Several functions inside OpenSSL incorrectly checked the result after
calling the EVP_VerifyFinal function, allowing a malformed signature
to be treated as a good signature rather than as an error.  This issue
affected the signature checks on DSA and  keys used with
/.

Läs den fullständiga varningen: openssl.org/news/secadv_20090107.txt

Intressant att notera är även att det är Googles säkerhetsteam som hittat denna säkerhetsbugg.

OpenSSL version 0.9.8i ute

Det omåttligt populära kryptobiblioteket OpenSSL har nu kommit ut i en ny version, nämligen 0.9.8i.

Några av de många förändringar och förbättringar är:

*) Delta CRL support

*) Support for CRLs partitioned by reason code

*) Support for freshest CRL extension.

*) Initial indirect CRL support.

*) Add support for distinct certificate and CRL paths.

*) Add support for policy mappings extension.

*) Fixes to pathlength constraint, self issued certificate handling,
policy processing to align with RFC3280 and PKITS tests.
*) Support for name constraints certificate extension. DN, email, DNS
and URI types are currently supported.

*) To cater for systems that provide a pointer-based thread ID rather
than numeric, deprecate the current numeric thread ID mechanism and
replace it with a structure and associated callback type

*) Initial support for different CRL issuing certificates.

*) Removed effectively defunct crypto/store from the build.

*) Revamp of STACK to provide stronger type-checking.

*) Add a new _MODE_RELEASE_BUFFERS mode flag to release unused buffer

RAM on SSL connections.

*) Revamp of LHASH to provide stronger type-checking.

*) Initial support for Cryptographic Message Syntax (aka CMS) based
on RFC3850, RFC3851 and RFC3852.

*) Add options to enc utility to support use of zlib compression BIO.

Några av dessa förändringar är sponsrade av . För att se samtliga ändringar:

http://www.openssl.org/source/exp/CHANGES

Föredrag om Debians OpenSSL-problem

Säkerhetsforskarna Jacob Appelbaum, Dino Dai Zovi samt Karsten Nohl höll nyligen ett föredrag på konferensen HOPE som gick av stapeln i New York. Deras föredrag handlade om -buggen som upptäcktes i Linux-distributionen för några månader sedan.

Exempelvis: Genom att betala 49KR för att hyra 20 st virtuella servrar hos Amazon Simple Scalable Storage (S3) samt Elastic Compute Cloud (EC2) så är det möjligt att dekryptera -trafik där någon av de 524,288 felaktiga nycklarna använts.

Se deras föredrag här: trailofbits.files.wordpress.com/2008/07/hope-08-openssl.pdf

TomLib (LibTomCrypt)

Är du less på att använda OpenSSL när du skriver C-kod? Då tycker jag att du ska testa TomLib vilket är ett antal C-bibliotek som hjälper dig med dina kryptografiskt relaterade beräkningar:

Projects are public domain open source libraries written in portable C. The libraries supports a variety of cryptographic and algebraic primitives designed to enable developers and students to pursue the field of cryptography much more efficiently. Currently the projects consist of three prominent libraries (, LibTomMath and TomsFastMath) which form the bulk of the source contributions.

Along with the source contributions, the LibTom projects also aim to serve an educational capacity. The libraries are very well commented, with clear and concise source. The code itself tells quite a story for those interested in learning how modern cryptography ticks. However, they would not be complete without the massive amount of documentation that accompanies the projects. Currently there are over 600 pages of LibTom Project documentation spread throughout the five projects.

LibTomCrypt är skrivet av Tom St Denis och första versionen sågs December 2001 och kallades då för MyCrypt.

Ladda hem LibTomCrypt: http://libtom.org/?page=download&newsitems=5&whatfile=crypt

Det finns även en portering till Python här: http://libtom.org/files/pyTomCrypt-v0.16.zip

Kryptering med PHP

PHP är ett mycket väl använt programmeringsspråk som används i samband med webb-programmering. Krypteringsfunktionerna i kan delas upp i följande kategorier:

Här följer en mycket liten sammanställning av dessa tre kategorier:

mcrypt

Mcrypt som är ett tredjepartsbibliotek innefattar en mängd kryptering/dekrypterings-funktioner såsom:

Vill du exempelvis skapa en SHA256 hexsträng på godtycklig sträng kan du göra enligt följande:

$sha256b= base64_encode(bin2hex(mhash(MHASH_,$phrase)));

openssl

OpenSSL är också ett tredjepartsbibliotek och innefattar bl.a dessa funktioner:

De funktioner OpenSSL tillhandahåller i PHP är mer inriktade på assymetrisk kryptering.

inbyggda funktioner

Den mest använda krypteringsfunktionen i PHP är crypt() som stödjer följande krypteringsalgoritmer:

  • CRYPT_STD_ – Standard DES-based encryption with a two character salt
  • CRYPT_EXT_DES – Extended DES-based encryption with a nine character salt
  • CRYPT_ – MD5 encryption with a twelve character salt starting with $1$
  • CRYPT_ – Blowfish encryption with a sixteen character salt starting with $2$ or $2a$

Övriga kryptorelaterade funktioner som återfinns som standard i PHP är exempelvis och md5.

Dåliga slumptal i Ubuntu och Debian

En allvarlig brist har upptäckts i och Debianbaserade distributioner som innebär att det är möjligt att förutspå vilka nycklar som genereras. Felet ligger i paketet och används exempelvis när nycklar skapas för och /HTTP.

Läs mer: http://wiki.debian.org/SSLkeys