Skip to content

Commit 5917d6f

Browse files
committedFeb 7, 2023
Update project version and documentation
This adds some more up-to-date docs, in case we want to take over Hackage maintenance for this particular library. It also bumps the version, to help clarify when we're relying on our own custom release on scrypt in other projects, and in case we want to take over Hackage maintenance.
1 parent fb18457 commit 5917d6f

7 files changed

+72
-13
lines changed
 

‎CHANGELOG.markdown

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog for `scrypt`
2+
3+
## 0.5.0.1
4+
5+
* Changed backing C bindings to link to
6+
[`libscrypt-kdf`](https://www.tarsnap.com/scrypt.html), a multi-platform
7+
implementation of scrypt, to allow for using the library on M1 Macs and
8+
other systems.

‎DEVELOPING.markdown

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Development
2+
3+
This repository is a [Nix flake](https://nixos.wiki/wiki/Flakes).
4+
5+
The supported way to start developing is to drop into the development shell,
6+
with `nix develop`. Make sure you have Nix installed for this, and that
7+
the necessary Nix features for using flakes are enabled.
8+
9+
Inside the development shell, you should be able to use `cabal` commands as
10+
normal i.e.
11+
12+
* `cabal v2-build` to compile the library - this will call `c2hs` automatically
13+
* `cabal test` to compile and run the tests
14+
15+
## cabal2nix
16+
17+
Because of issues with using `callCabal2nix` in the flake overlay, this project
18+
relies on a manually-generated Nix derivation to define the Haskell package.
19+
This file is still generated with `cabal2nix`, but it is simply tracked in the
20+
git history.
21+
22+
It should be regenerated every time `scrypt.cabal` is edited. To regenerate the
23+
file after editing `scrypt.cabal`, run this in the development shell:
24+
25+
```
26+
cabal2nix . > cabal2nix-scrypt.nix
27+
```
28+
29+
## c2hs
30+
31+
Because of a peculiarity with how the `scrypt` C library defines its public
32+
function API, we rely on `c2hs` to do some preprocessing of our Haskell files.
33+
34+
If you use the development approach supported above, this should be handled
35+
automatically for you. Otherwise, you will have to generate the Haskell code
36+
yourself manually.
37+
38+
## libscrypt-kdf
39+
40+
Generating the Haskell bindings for this library requires a copy of the
41+
`libscrypt-kdf` library that includes the development header.
42+
43+
This header is provided by the Nix flake automatically. If you aren't using Nix,
44+
you will probably have to install it manually - look for `libscrypt-kdf` in your
45+
package manager.

‎LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Copyright (c)2011, Falko Peters
2+
(c)2023, Supercede Ltd.
23

34
All rights reserved.
45

‎README.markdown

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ This is a Haskell library providing bindings to [Colin Percival's scrypt impleme
44

55
Details of the scrypt key derivation function are given in a paper by Colin Percival, Stronger Key Derivation via Sequential Memory-Hard Functions: [PDF](http://www.tarsnap.com/scrypt/scrypt-slides.pdf).
66

7+
Unlike earlier versions of the `scrypt` library, this version is compatible with multiple OSes and architectures.
8+
79
# Join in!
810

911
We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.
1012

11-
Please report bugs via the [github issue tracker](http://github.com/informatikr/scrypt/issues).
13+
Please report bugs via the [github issue tracker](http://github.com/SupercedeTech/scrypt/issues).
1214

13-
Master [git repository](http://github.com/informatikr/scrypt):
15+
Master [git repository](http://github.com/SupercedeTech/scrypt):
1416

15-
git clone git://github.com/informatikr/scrypt.git
17+
git clone git://github.com/SupercedeTech/scrypt.git
1618

1719
# Authors
1820

19-
This library is written and maintained by Falko Peters, <falko.peters@gmail.com>.
21+
This library was originally written by Falko Peters, <falko.peters@gmail.com>, with thanks to Thomas DuBuisson.
22+
23+
This library is maintained by Supercede Ltd., <support@supercede.com>.
2024

21-
Thanks to Thomas DuBuisson for suggesting the changes to make this package windows-compatible.

‎cabal2nix-scrypt.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
}:
55
mkDerivation {
66
pname = "scrypt";
7-
version = "0.5.0";
7+
version = "0.5.0.1";
88
src = ./.;
99
libraryHaskellDepends = [
1010
base base64-bytestring bytestring entropy
@@ -15,7 +15,7 @@ mkDerivation {
1515
base bytestring HUnit QuickCheck test-framework
1616
test-framework-hunit test-framework-quickcheck2
1717
];
18-
homepage = "http://github.com/informatikr/scrypt";
18+
homepage = "http://github.com/SupercedeTech/scrypt";
1919
description = "Stronger password hashing via sequential memory-hard functions";
2020
license = lib.licenses.bsd3;
2121
}

‎flake.nix

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
withHoogle = false;
3232
buildInputs = with haskellPackages; [
3333
cabal-install
34+
cabal2nix
3435
c2hs
3536
];
3637
});

‎scrypt.cabal

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: scrypt
2-
version: 0.5.0
2+
version: 0.5.0.1
33
license: BSD3
44
license-file: LICENSE
55
category: Cryptography
6-
copyright: Copyright 2011 Falko Peters
6+
copyright: Copyright 2011 Falko Peters, 2023 Supercede Ltd.
77
author: Falko Peters <falko.peters@gmail.com>
8-
maintainer: Falko Peters <falko.peters@gmail.com>
8+
maintainer: Supercede Ltd. <support@supercede.com>
99
stability: experimental
1010
cabal-version: >= 1.8
11-
homepage: http://github.com/informatikr/scrypt
12-
bug-reports: http://github.com/informatikr/scrypt/issues
11+
homepage: http://github.com/SupercedeTech/scrypt
12+
bug-reports: http://github.com/SupercedeTech/scrypt/issues
1313
build-type: Simple
1414
synopsis:
1515
Stronger password hashing via sequential memory-hard functions.
@@ -25,10 +25,11 @@ description:
2525

2626
extra-source-files:
2727
README.markdown
28+
CHANGELOG.markdown
2829

2930
source-repository head
3031
type: git
31-
location: http://github.com/informatikr/scrypt
32+
location: http://github.com/SupercedeTech/scrypt
3233

3334
library
3435
exposed-modules: Crypto.Scrypt

0 commit comments

Comments
 (0)
Please sign in to comment.