pyocb

OCB-AES authenticated encryption for Python
Download

pyocb Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Public Domain
  • Price:
  • FREE
  • Publisher Name:
  • Pawel Krawczyk
  • Publisher web site:
  • http://ipsec.pl/pubs/pam_tacplus.php

pyocb Tags


pyocb Description

pyocb is a Python module that provides pure Python implementation of authenticated encryption mode OCB (Offset Codebook Mode) using AES block cipher. OCB offers confidentiality, integrity and authenticity of data in single encryption step and using single interface. It's alternative to traditional modes (like CTR or CBC) with separate HMAC calculation.UsageDataThe module operates on _bytearray_ objects. Key, nonce, header and plaintext should be passed to OCB as bytearrays. >>> plaintext = bytearray('The Magic Words are Squeamish Ossifrage') >>> header = bytearray('Recipient: john.doe@example.com') >>> key = bytearray().fromhex('A45F5FDEA5C088D1D7C8BE37CABC8C5C') >>> nonce = bytearray(range(16))LoadingLoad a block cipher and OCB mode: >>> from ocb.aes import AES >>> from ocb import OCBThe OCB module provides built-in AES implementation, but other block ciphers can be used as well.Initalize OCB-AES cipher objects: >>> aes = AES(128) >>> ocb = OCB(aes)Product's homepage


pyocb Related Software