Top

pcr module

# Copyright (c) 2013 Stefano Palazzo <stefano.palazzo@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import pkg_resources


try:
    __version__ = pkg_resources.get_distribution(__package__).version
except:  # pragma: no cover
    __version__ = '<unknown>'

Sub-modules

pcr.aes

Advanced Encryption Standard - Block Cipher

pcr.cbc

Cipher Block Chaining Mode of Operation

pcr.diffie_hellman

Diffie-Hellman Key Exchange

pcr.hotp

Time OTP implementation for 2-factor authentication

pcr.maths

Various mathematical function used in public key cryptography

pcr.pbkdf2

Password based key-derivation function - PBKDF2

pcr.pkcs7

PKCS7 Padding for Block Cipher Modes

pcr.rc4

RC4 stream cipher

pcr.rfc3526

Groups for Diffie-Hellman as defined by RFC 3526

To get access to the 2048 bit group, for example, type:

>>> prime, generator = rfc3526.groups[2048]

See http://tools.ietf.org/html/rfc3526 for notes on usage.

pcr.xtea

XTEA block cipher (32 rounds)