Skip to content

Commit

Permalink
streamxor_salsa20 should be stream_salsa20_xor. Likewise with smult_b…
Browse files Browse the repository at this point in the history
…ase.
  • Loading branch information
agl committed Sep 18, 2008
1 parent e0e08ec commit 896f5b2
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions slownacl/__init__.py
@@ -1,9 +1,9 @@
from util import xor, randombytes
from verify import verify16, verify32
from salsa20 import stream_salsa20, streamxor_salsa20
from salsa20 import stream_salsa20, stream_salsa20_xor
from poly1305 import onetimeauth_poly1305, onetimeauth_poly1305_verify
from hash import hash_sha512, auth_hmacsha512, auth_hmacsha512_verify
from curve25519 import smult_curve25519, smult_base_curve25519
from curve25519 import smult_curve25519, smult_curve25519_base


def secretbox_salsa20hmacsha512(m, n, k):
Expand Down
Binary file added slownacl/__init__.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions slownacl/curve25519.py
@@ -1,4 +1,4 @@
__all__ = ['smult_base_curve25519', 'smult_curve25519']
__all__ = ['smult_curve25519_base', 'smult_curve25519']

P = 2 ** 255 - 19
A = 486662
Expand Down Expand Up @@ -57,6 +57,6 @@ def smult_curve25519(n, p):
p = unpack(p)
return pack(curve25519(n, p))

def smult_base_curve25519(n):
def smult_curve25519_base(n):
n = clamp(unpack(n))
return pack(curve25519(n, 9))
Binary file added slownacl/curve25519.pyc
Binary file not shown.
Binary file added slownacl/hash.pyc
Binary file not shown.
Binary file added slownacl/poly1305.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions slownacl/salsa20.py
@@ -1,7 +1,7 @@
import struct
from util import xor

__all__ = ['stream_salsa20', 'streamxor_salsa20']
__all__ = ['stream_salsa20', 'stream_salsa20_xor']

def rotate(x, n):
x &= 0xffffffff
Expand Down Expand Up @@ -59,5 +59,5 @@ def stream_salsa20(l, n, k):
output.append(block(i // 64, n, k))
return ''.join(output)[:l]

def streamxor_salsa20(m, n, k):
def stream_salsa20_xor(m, n, k):
return xor(m, stream_salsa20(len(m), n, k))
Binary file added slownacl/salsa20.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions slownacl/test.py
Expand Up @@ -41,6 +41,6 @@ def check(its, name, arglens):
if __name__ == '__main__':
check(1024, 'hash_sha512', [(1, 100)])
check(1024, 'auth_hmacsha512', [(1, 100), 32])
check(256, 'smult_base_curve25519', [32])
check(128, 'streamxor_salsa20', [(0, 1024), 8, 32])
check(256, 'smult_curve25519_base', [32])
check(128, 'stream_salsa20_xor', [(0, 1024), 8, 32])
check(64, 'smult_curve25519', [32, 32])
Binary file added slownacl/util.pyc
Binary file not shown.
Binary file added slownacl/verify.pyc
Binary file not shown.

0 comments on commit 896f5b2

Please sign in to comment.