SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
StateofcryptoinPythonA library created by people who make poor life choices.
HowDidWeGetHere
At Rackspace we work on an OpenStack,
key management product named Barbican.
We needed to use crypto.
Cue the 80s working montage
WhatDoWeWant
Algorithm support Open Source MAINTAINED & Tested Python Support
Trust
WHyc?
All major cryptographic libraries are currently implemented in a low level language,
mostly C or C++.
Reviewed Code
Several C libraries have been sponsored through the review
process for professional crypto review including various
compliances that some customers care about.
Future possibilities
There are some exciting options for future work in the crypto
space with languages like Rust / Go. Unfortunately, these
aren’t usable from Python right now.
Timing / Memory Attacks
These attacks relate to exploiting timing differentials or
securely wiping memory. They are difficult or impossible to
remediate without the low level control exposed by C.
Existing Code
Writing good crypto code is hard. Most existing libraries have
a long history including significant bug-fixing / research.
StateofC
OSS
 X-Platform
 Maintained
 Ubiquitous
 Std. Algorithms
 FIPS
OpenSSL
NSS
NaCl
Botan
CommonCrypto
MS CSP
Libgcrypt
LibreSSL
StateOfPython
Backend
 Maintained
 Python Support
 Reviewed
 Completeness
m2crypto
 openssl	

 recently active	

 pypy with patch, no py3	

 no	

 openssl swig	

pycrypto
 bespoke*	

 yes	

 no pypy	

 no	

 no AEAD (without alpha)	

pyopenssl
 openssl*	

 yes	

 yes (with crypto)	

 no	

 Thin openssl bindings	

python-nss
 NSS	

 low	

 unknown	

 no	

 exposes some of NSS	

botan
 botan	

 yes	

 py3, maybe pypy	

 no	

 exposes most of botan	

Most of these libraries require / assume the user understands how to use the underlying C library
correctly.
a new crypto library for Python
•  Support for PyPy and
Python 3
•  Large, active team
•  Encourages use of strong,
secure algorithms
•  “Cryptography for humans”,
APIs
•  Support for modern
algorithms such as AES-
GCM and HKDF
•  Improved debug-ability and
testability
•  Sane, secure API design
(where possible)
cryptography
Grandiose Vision:
A cryptographic standard library for Python.
Python Cryptographic Authority
•  PyNaCl – Python bindings for the NaCL library
•  cryptography – Python library to expose
cryptographic constructs
•  service_identity – Service identity (hostname
verification) for PyOpenSSL.
•  PyOpenSSL – Python bindings for OpenSSL
•  bcrypt – Python wrapper for bcrypt library
•  ed25519 – Pure Python implementation of one elliptic
curve signature schemeLogo courtesy of GitHub’s auto-
generation.
PYCA
TheStructure
Bindings
Hazmat
Recipes
Backends
OpenSSL
Our primary (and only guaranteed) backend. We don’t
currently package OpenSSL to allow for flexibility for package
maintainers.
Common Crypto
Available on OS X and iOS, this is the preferred backend on
OS X. Apple has decided not to ship newer version of
OpenSSL, leaving developers with a old version lacking
modern algorithms.
Cryptography is designed around the concept of backends. Each backend implements a set of defined
interfaces. This allows us to implement a backend for each C library and exchange them transparently.
MULTIBACKEND
This meta-backend allows composition and prioritization of
multiple backends. This creates a superset of operations in
Python, isolating the developer from variations in C libraries.
Moar!
Any C backend can be included. We have spoken with many
of the C library maintainers about writing a backend for
cryptography.
Tests per run
Testify
73,813
575+ Million tests per week
78 Runs per build
5,757,414 Tests per build
15 Builds per day
45 Documentation runs per day
Alex Gaynor (Alex_gaynor) Paul Kehrer (reaperhulk) David Reid (dreid) Alex Stapleton (alexs)
ourPeople
5+ Commit Club
aryx, skeuomorf, lvh, dstufft, cyli, exarkun, hynek, ashfall, juliankrause, wallrj, lvoz, phibos, chrisglass
+ 22 more contributors
currentSupport
Symmetric
Currently support a variety of common ciphers such as AES,
Camellia, 3DES, CAST5, etc. Most non-patent encumbered
block cipher modes are also supported.
hashing
Support for common hashing algorithm like SHA1 / SHA2,
RIPEMD160, Whirlpool and MD5, including HMAC support
for all supported hashes. Support for KDFs and TOTP.
Asymmetric Support
Supports RSA, DSA and elliptic curve for signing, verification,
encryption and decryption (for RSA). PKCS #1 and #8 key
loading done now.
fernet
A high level recipe designed to provide easy to use
authenticated encryption.
Tl;dr Authenticated Encryption at rest, Public key signatures & encryption,
Hashing, HMAC, Key derivation, two-factor (OTP)
DownstreamConsumers
PyOpenssl
Current based on cryptography. Pure python
package, gained support for PyPy and Py3
Pycrypto
Currently in prototype / investigation phase.
Paramiko
Work in progress PR for rebasing.
Conch
Interest expressed in switching. Someone
interested in writing a patch?0
50000
100000
150000
200000
250000
300000
350000
400000
450000
0.1 0.2 0.3 0.4 0.5
Cryptography PyPI download counts
DualLicensing
Project Licensing
Cryptography is licensed using Apache 2
and two-clause BSD (in-progress).
Backend Licensing
Set by the backend author, can
accommodate any license structure.
•  Van Lindberg
•  Chairman of the Python
Software Foundation
•  Wrote “Intellectual Property and
Open Source”
•  Rackspace IP Head Honcho
if you don’t like it, blame van
LetsReview
Algorithm support Open Source MAINTAINED & Tested Python Support
Multi-Backend
& Openssl
Apache 2 &
BSD
575+ Million Tests
40+ contributors
2.6, 2.7, 3.2, 3.3, 3.4,
& pypy
FutureWork
X509
Support for parsing all extension and object types defined in
RFC3280 and RFC5280.
TLS
TLS 1.2 support, modern cipher suites, stripe open source
grant winner working on TLS for cryptography.
Less Common Primitives
Chacha20, Salsa20, non-NIST elliptic curves.
Multiple backend support
Allows for backends to live in separate packages and be
used by cryptography at runtime.
Github
github.com/pyca/cryptography
Website
cryptography.io
Install
pip install cryptography
~ fin ~

Weitere ähnliche Inhalte

Was ist angesagt?

Mqtt & Kafka & Security
Mqtt & Kafka & SecurityMqtt & Kafka & Security
Mqtt & Kafka & SecurityVirgil Borcea
 
Tools for Offensive RTC security. Introducing SIPVicious PRO and the demo ser...
Tools for Offensive RTC security. Introducing SIPVicious PRO and the demo ser...Tools for Offensive RTC security. Introducing SIPVicious PRO and the demo ser...
Tools for Offensive RTC security. Introducing SIPVicious PRO and the demo ser...Alan Quayle
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilitySamsung Open Source Group
 
(03 2013) guide to kali linux
(03 2013)   guide to kali linux(03 2013)   guide to kali linux
(03 2013) guide to kali linuxjulius77
 

Was ist angesagt? (6)

Framework for IoT Interoperability
Framework for IoT InteroperabilityFramework for IoT Interoperability
Framework for IoT Interoperability
 
Mqtt & Kafka & Security
Mqtt & Kafka & SecurityMqtt & Kafka & Security
Mqtt & Kafka & Security
 
Tools for Offensive RTC security. Introducing SIPVicious PRO and the demo ser...
Tools for Offensive RTC security. Introducing SIPVicious PRO and the demo ser...Tools for Offensive RTC security. Introducing SIPVicious PRO and the demo ser...
Tools for Offensive RTC security. Introducing SIPVicious PRO and the demo ser...
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
 
(03 2013) guide to kali linux
(03 2013)   guide to kali linux(03 2013)   guide to kali linux
(03 2013) guide to kali linux
 
Go paranoid
Go paranoidGo paranoid
Go paranoid
 

Ähnlich wie State of Crypto in Python (OSCON)

State of Crypto in Python
State of Crypto in PythonState of Crypto in Python
State of Crypto in Pythonjarito030506
 
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre ZembBuilding a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre ZembStreamNative
 
Barbican 1.0 - Open Source Key Management for OpenStack
Barbican 1.0 - Open Source Key Management for OpenStackBarbican 1.0 - Open Source Key Management for OpenStack
Barbican 1.0 - Open Source Key Management for OpenStackjarito030506
 
Cryptographic Hardware Support for the Linux Kernel - Netconf 2004
Cryptographic Hardware Support for the Linux Kernel - Netconf 2004Cryptographic Hardware Support for the Linux Kernel - Netconf 2004
Cryptographic Hardware Support for the Linux Kernel - Netconf 2004James Morris
 
Introduction Apache Kafka
Introduction Apache KafkaIntroduction Apache Kafka
Introduction Apache KafkaJoe Stein
 
Real time cloud native open source streaming of any data to apache solr
Real time cloud native open source streaming of any data to apache solrReal time cloud native open source streaming of any data to apache solr
Real time cloud native open source streaming of any data to apache solrTimothy Spann
 
Shmoocon 2013 - OpenStack Security Brief
Shmoocon 2013 - OpenStack Security BriefShmoocon 2013 - OpenStack Security Brief
Shmoocon 2013 - OpenStack Security Briefopenfly
 
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022Timothy Spann
 
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...StreamNative
 
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreKafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreStreamNative
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!QAware GmbH
 
Music city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lakeMusic city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lakeTimothy Spann
 
Security with VA Smalltalk
Security with VA SmalltalkSecurity with VA Smalltalk
Security with VA SmalltalkESUG
 
Jwt == insecurity?
Jwt == insecurity?Jwt == insecurity?
Jwt == insecurity?snyff
 
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...Ramesh Nagappan
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloJoe Stein
 
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...Accumulo Summit
 
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsBig Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsGuido Schmutz
 
Tech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore RoadmapTech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore RoadmapAdaCore
 
Apache Stratos - Building a PaaS using OSGi and Equinox
Apache Stratos - Building a PaaS using OSGi and EquinoxApache Stratos - Building a PaaS using OSGi and Equinox
Apache Stratos - Building a PaaS using OSGi and EquinoxPaul Fremantle
 

Ähnlich wie State of Crypto in Python (OSCON) (20)

State of Crypto in Python
State of Crypto in PythonState of Crypto in Python
State of Crypto in Python
 
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre ZembBuilding a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
 
Barbican 1.0 - Open Source Key Management for OpenStack
Barbican 1.0 - Open Source Key Management for OpenStackBarbican 1.0 - Open Source Key Management for OpenStack
Barbican 1.0 - Open Source Key Management for OpenStack
 
Cryptographic Hardware Support for the Linux Kernel - Netconf 2004
Cryptographic Hardware Support for the Linux Kernel - Netconf 2004Cryptographic Hardware Support for the Linux Kernel - Netconf 2004
Cryptographic Hardware Support for the Linux Kernel - Netconf 2004
 
Introduction Apache Kafka
Introduction Apache KafkaIntroduction Apache Kafka
Introduction Apache Kafka
 
Real time cloud native open source streaming of any data to apache solr
Real time cloud native open source streaming of any data to apache solrReal time cloud native open source streaming of any data to apache solr
Real time cloud native open source streaming of any data to apache solr
 
Shmoocon 2013 - OpenStack Security Brief
Shmoocon 2013 - OpenStack Security BriefShmoocon 2013 - OpenStack Security Brief
Shmoocon 2013 - OpenStack Security Brief
 
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022
 
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
Introducing Kafka-on-Pulsar: bring native Kafka protocol support to Apache Pu...
 
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&PierreKafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
Kafka on Pulsar:bringing native Kafka protocol support to Pulsar_Sijie&Pierre
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!
 
Music city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lakeMusic city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lake
 
Security with VA Smalltalk
Security with VA SmalltalkSecurity with VA Smalltalk
Security with VA Smalltalk
 
Jwt == insecurity?
Jwt == insecurity?Jwt == insecurity?
Jwt == insecurity?
 
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
Analysis of Security and Compliance using Oracle SPARC T-Series Servers: Emph...
 
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache AccumuloReal-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
Real-Time Distributed and Reactive Systems with Apache Kafka and Apache Accumulo
 
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
Accumulo Summit 2015: Real-Time Distributed and Reactive Systems with Apache ...
 
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsBig Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
 
Tech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore RoadmapTech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore Roadmap
 
Apache Stratos - Building a PaaS using OSGi and Equinox
Apache Stratos - Building a PaaS using OSGi and EquinoxApache Stratos - Building a PaaS using OSGi and Equinox
Apache Stratos - Building a PaaS using OSGi and Equinox
 

Kürzlich hochgeladen

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

State of Crypto in Python (OSCON)

  • 1. StateofcryptoinPythonA library created by people who make poor life choices.
  • 2. HowDidWeGetHere At Rackspace we work on an OpenStack, key management product named Barbican. We needed to use crypto. Cue the 80s working montage
  • 3. WhatDoWeWant Algorithm support Open Source MAINTAINED & Tested Python Support Trust
  • 4. WHyc? All major cryptographic libraries are currently implemented in a low level language, mostly C or C++. Reviewed Code Several C libraries have been sponsored through the review process for professional crypto review including various compliances that some customers care about. Future possibilities There are some exciting options for future work in the crypto space with languages like Rust / Go. Unfortunately, these aren’t usable from Python right now. Timing / Memory Attacks These attacks relate to exploiting timing differentials or securely wiping memory. They are difficult or impossible to remediate without the low level control exposed by C. Existing Code Writing good crypto code is hard. Most existing libraries have a long history including significant bug-fixing / research.
  • 5. StateofC OSS X-Platform Maintained Ubiquitous Std. Algorithms FIPS OpenSSL NSS NaCl Botan CommonCrypto MS CSP Libgcrypt LibreSSL
  • 6. StateOfPython Backend Maintained Python Support Reviewed Completeness m2crypto openssl recently active pypy with patch, no py3 no openssl swig pycrypto bespoke* yes no pypy no no AEAD (without alpha) pyopenssl openssl* yes yes (with crypto) no Thin openssl bindings python-nss NSS low unknown no exposes some of NSS botan botan yes py3, maybe pypy no exposes most of botan Most of these libraries require / assume the user understands how to use the underlying C library correctly.
  • 7. a new crypto library for Python •  Support for PyPy and Python 3 •  Large, active team •  Encourages use of strong, secure algorithms •  “Cryptography for humans”, APIs •  Support for modern algorithms such as AES- GCM and HKDF •  Improved debug-ability and testability •  Sane, secure API design (where possible) cryptography Grandiose Vision: A cryptographic standard library for Python.
  • 8. Python Cryptographic Authority •  PyNaCl – Python bindings for the NaCL library •  cryptography – Python library to expose cryptographic constructs •  service_identity – Service identity (hostname verification) for PyOpenSSL. •  PyOpenSSL – Python bindings for OpenSSL •  bcrypt – Python wrapper for bcrypt library •  ed25519 – Pure Python implementation of one elliptic curve signature schemeLogo courtesy of GitHub’s auto- generation. PYCA
  • 10. Backends OpenSSL Our primary (and only guaranteed) backend. We don’t currently package OpenSSL to allow for flexibility for package maintainers. Common Crypto Available on OS X and iOS, this is the preferred backend on OS X. Apple has decided not to ship newer version of OpenSSL, leaving developers with a old version lacking modern algorithms. Cryptography is designed around the concept of backends. Each backend implements a set of defined interfaces. This allows us to implement a backend for each C library and exchange them transparently. MULTIBACKEND This meta-backend allows composition and prioritization of multiple backends. This creates a superset of operations in Python, isolating the developer from variations in C libraries. Moar! Any C backend can be included. We have spoken with many of the C library maintainers about writing a backend for cryptography.
  • 11. Tests per run Testify 73,813 575+ Million tests per week 78 Runs per build 5,757,414 Tests per build 15 Builds per day 45 Documentation runs per day
  • 12. Alex Gaynor (Alex_gaynor) Paul Kehrer (reaperhulk) David Reid (dreid) Alex Stapleton (alexs) ourPeople 5+ Commit Club aryx, skeuomorf, lvh, dstufft, cyli, exarkun, hynek, ashfall, juliankrause, wallrj, lvoz, phibos, chrisglass + 22 more contributors
  • 13. currentSupport Symmetric Currently support a variety of common ciphers such as AES, Camellia, 3DES, CAST5, etc. Most non-patent encumbered block cipher modes are also supported. hashing Support for common hashing algorithm like SHA1 / SHA2, RIPEMD160, Whirlpool and MD5, including HMAC support for all supported hashes. Support for KDFs and TOTP. Asymmetric Support Supports RSA, DSA and elliptic curve for signing, verification, encryption and decryption (for RSA). PKCS #1 and #8 key loading done now. fernet A high level recipe designed to provide easy to use authenticated encryption. Tl;dr Authenticated Encryption at rest, Public key signatures & encryption, Hashing, HMAC, Key derivation, two-factor (OTP)
  • 14. DownstreamConsumers PyOpenssl Current based on cryptography. Pure python package, gained support for PyPy and Py3 Pycrypto Currently in prototype / investigation phase. Paramiko Work in progress PR for rebasing. Conch Interest expressed in switching. Someone interested in writing a patch?0 50000 100000 150000 200000 250000 300000 350000 400000 450000 0.1 0.2 0.3 0.4 0.5 Cryptography PyPI download counts
  • 15. DualLicensing Project Licensing Cryptography is licensed using Apache 2 and two-clause BSD (in-progress). Backend Licensing Set by the backend author, can accommodate any license structure. •  Van Lindberg •  Chairman of the Python Software Foundation •  Wrote “Intellectual Property and Open Source” •  Rackspace IP Head Honcho if you don’t like it, blame van
  • 16. LetsReview Algorithm support Open Source MAINTAINED & Tested Python Support Multi-Backend & Openssl Apache 2 & BSD 575+ Million Tests 40+ contributors 2.6, 2.7, 3.2, 3.3, 3.4, & pypy
  • 17. FutureWork X509 Support for parsing all extension and object types defined in RFC3280 and RFC5280. TLS TLS 1.2 support, modern cipher suites, stripe open source grant winner working on TLS for cryptography. Less Common Primitives Chacha20, Salsa20, non-NIST elliptic curves. Multiple backend support Allows for backends to live in separate packages and be used by cryptography at runtime. Github github.com/pyca/cryptography Website cryptography.io Install pip install cryptography