raaz: Fast and type safe cryptography.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Raaz is a cryptographic library which provides the state of the art cryptographic primitives via a high-level, type safe interface. The default interface provided to the user is through the top level module Raaz. Rather than bothering the user with low-level details like the selection of primitives or entropy sources, this top level module only talks about the desired cryptographic operation (whether it is message digest or message encryption etc). A standalone application that needs cryptography should stick to using this top level interface.

Sometimes the selection of primitives is not in our hands --- we may need to interface with other programs written in other languages or using other libraries. For such situation, raaz exposes a primitive specific interface. As an example raaz exposes the Raaz.Digest.Sha256 module that gives the same interface as that of Raaz.Digest but uses sha256 as the underlying cryptographic hash.


[Skip to Readme]

Properties

Versions 0.0.1, 0.0.2, 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10
Change log CHANGELOG.md
Dependencies base (>=4.11 && <4.16), bytestring (>=0.10 && <0.12), criterion-measurement (>=0.1), deepseq (>=1.4 && <1.5), hspec, HUnit (>=1.2), optparse-applicative (>=0.13.0.0), pretty, QuickCheck (>=2.4), raaz, transformers, vector (>=0.12 && <0.13) [details]
License (Apache-2.0 OR BSD-3-Clause)[multiple license files]
Copyright (c) 2012 Piyush P Kurur
Author Piyush P Kurur
Maintainer ppk@cse.iitk.ac.in
Category Codec, Raaz
Home page https://github.com/raaz-crypto/raaz
Bug tracker https://github.com/raaz-crypto/raaz/issues
Source repo head: git clone https://github.com/raaz-crypto/raaz
Uploaded by PiyushKurur at 2021-05-20T07:59:33Z

library raaz

Modules

[Index] [Quick Jump]

  • Raaz
    • Raaz.Auth
      • Raaz.Auth.Blake2b
      • Raaz.Auth.Blake2s
    • Raaz.AuthEncrypt
      • Raaz.AuthEncrypt.Unsafe
        • Raaz.AuthEncrypt.Unsafe.ChaCha20Poly1305
        • Raaz.AuthEncrypt.Unsafe.XChaCha20Poly1305
    • Raaz.Core
      • Raaz.Core.Encode
      • Raaz.Core.Types
    • Raaz.Digest
      • Raaz.Digest.Blake2b
      • Raaz.Digest.Blake2s
      • Raaz.Digest.Sha256
      • Raaz.Digest.Sha512
    • Raaz.Random
      • Raaz.Random.Internal

library raaz:bench-csprg

Modules

[Index] [Quick Jump]

library raaz:bench-prim

Modules

[Index] [Quick Jump]

  • Benchmark
    • Benchmark.Primitive

library raaz:bench-types

Modules

[Index] [Quick Jump]

library raaz:test-auth-implementation

Modules

[Index] [Quick Jump]

  • Auth
    • Mac
      • Auth.Mac.Blake2b
      • Auth.Mac.Blake2s
    • Auth.Poly1305

library raaz:test-auth

Signatures

Modules

[Index] [Quick Jump]

  • Tests
    • Tests.Auth

library raaz:test-digest

Signatures

Modules

[Index] [Quick Jump]

  • Tests
    • Tests.Digest

library raaz:test-cipher

Modules

[Index] [Quick Jump]

  • Tests
    • Tests.Cipher

library raaz:test-core

Modules

[Index] [Quick Jump]

  • Tests
    • Tests.Core
      • Tests.Core.Imports
      • Tests.Core.Instances
      • Tests.Core.Utils

library raaz:implementation

Modules

[Index] [Quick Jump]

  • Blake2b
    • Blake2b.CHandWritten
    • Blake2b.CPortable
    • Blake2b.Implementation
  • Blake2s
    • Blake2s.CHandWritten
    • Blake2s.Implementation
  • ChaCha20
    • ChaCha20.CHandWritten
    • ChaCha20.CPortable
    • ChaCha20.Implementation
    • Random
      • ChaCha20.Random.CPortable
  • Entropy
  • Poly1305
    • Poly1305.CPortable
    • Poly1305.Implementation
  • Random
    • Random.Implementation
  • Sha256
    • Sha256.CHandWritten
    • Sha256.CPortable
    • Sha256.Implementation
  • Sha512
    • Sha512.CHandWritten
    • Sha512.CPortable
    • Sha512.Implementation

library raaz:aead-api

Signatures

  • Auth
    • Auth.Implementation
  • Cipher
    • Cipher.Implementation

Modules

[Index] [Quick Jump]

  • Interface

library raaz:encrypt-api

Signatures

Modules

[Index] [Quick Jump]

  • Interface

library raaz:random-api

Signatures

Modules

[Index] [Quick Jump]

  • Internal
  • PRGenerator

library raaz:auth-api

Signatures

Modules

[Index] [Quick Jump]

  • Interface

library raaz:digest-api

Signatures

Modules

[Index] [Quick Jump]

  • Interface

library raaz:xchacha-indef

Signatures

Modules

[Index] [Quick Jump]

  • XChaCha20
    • XChaCha20.Implementation

library raaz:mac-indef

Signatures

Modules

[Index] [Quick Jump]

  • Mac
    • Mac.Implementation

library raaz:utils

Modules

[Index] [Quick Jump]

  • Utils

library raaz:buffer

Modules

[Index] [Quick Jump]

  • Buffer
  • Context

library raaz:indef

Signatures

library raaz:libverse

Modules

[Index] [Quick Jump]

  • Raaz
    • Verse
      • Blake2b
        • C
          • Raaz.Verse.Blake2b.C.Portable
      • ChaCha20
        • C
          • Raaz.Verse.ChaCha20.C.Portable
      • Poly1305
        • C
          • Raaz.Verse.Poly1305.C.Portable
      • Sha256
        • C
          • Raaz.Verse.Sha256.C.Portable
      • Sha512
        • C
          • Raaz.Verse.Sha512.C.Portable

library raaz:core

Modules

[Index] [Quick Jump]

  • Raaz
    • Raaz.Core
      • Raaz.Core.CpuSupports
      • Raaz.Core.Encode
      • Raaz.Core.Memory
      • Raaz.Core.Prelude
      • Raaz.Core.Transfer
        • Raaz.Core.Transfer.Unsafe
      • Raaz.Core.Types
        • Raaz.Core.Types.Internal
    • Primitive
      • AEAD
        • Raaz.Primitive.AEAD.Internal
      • Blake2
        • Raaz.Primitive.Blake2.Internal
      • ChaCha20
        • Raaz.Primitive.ChaCha20.Internal
      • Raaz.Primitive.HashMemory
      • Keyed
        • Raaz.Primitive.Keyed.Internal
      • Poly1305
        • Raaz.Primitive.Poly1305.Internal
      • Sha2
        • Raaz.Primitive.Sha2.Internal

Flags

Manual Flags

NameDescriptionDefault
linux-getrandom

Use the getrandom for system entropy instead of devurandom. Enabled by default but disable this when building for kernel < 3.17.

Enabled
native

Compile for native architecture. Often this enables a lot of platform specific optimisation which lead to better performance. Do not enable this when packaging though. Also tested only with gcc

Disabled
wipe-memset

Use plain memset for wiping memory. The problem with its use is that agressive compilers often optimise it out. Raaz uses platform specific functions designed specifically to avoid this and hence enabling this flag is STRONGLY DISCOURAGED. Use it only if your platform does not support such a call.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for raaz-0.3.0

[back to package description]

Raaz: A secure cryptographic library

Apache-2.0 OR BSD-3-Clause Hackage Hackage Dependencies

Raaz is a cryptographic library in Haskell that provide a high level and safe access to a lot of cryptographic operations. The library can be used for standalone cryptographic applications as well as for implementing other network protocols. Some of the features that are unique to raaz are the following

  1. Pervasive use of types for better safety.
  2. Default choice of primitives and implementations are safe.
  3. Mechanism to have multiple implementations for any given cryptographic primitives. An advanced user who has an in-depth knowledge of the platform should be able to plugin the desired implementation.
  4. Strong emphasis on API design with through documentation.

Building

The recommended way to install raaz is through cabal-install version 3.0 or above. We also need a version of GHC that supports backpack (for details on which version of GHC is supported, refer to our CI-builds).

cabal build
cabal test
cabal install

Online documentation

About the name

The word Raaz (राज़) stands for secret in Hindi.

Copyright 2012 Piyush P Kurur

The library is licensed under

You may not use this software except in compliance with one of the above Licenses (at your option).

SPDX-License-Identifier: (Apache-2.0 OR BSD-3-Clause)

Unless required by applicable law or agreed to in writing, software distributed under these Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. For the exact terms and conditions see the accompanying LICENSE file.