crypto-toolbox 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 466b866a98ec3be521f61b4097c2c4346b301d6e
|
4
|
+
data.tar.gz: 6840f6e1882fd69e48a5d3bed909020cbfbd1089
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68768144aae70032acc66b9dc7b1e247421cacb717c9b4f39857ef649eec2fb71b1ceb76a76b999e23a6a76cf77d7ace9c874c6f012cb406328ff41453d1234b
|
7
|
+
data.tar.gz: 11bc83467a87b7bb4bb3d862e458037ff0644144b9ace18fab2c4f79782ee99010a8438dd781d0c7f25a3a36868733f9b87439e8e057555b6b39b576aea8b779
|
@@ -25,8 +25,7 @@ module Analyzers
|
|
25
25
|
|
26
26
|
def mac(message)
|
27
27
|
connect unless @mac_socket
|
28
|
-
|
29
|
-
packet = ([message.length] + message.bytes + [0]).map(&:chr).join("")
|
28
|
+
packet = ( message.length.to_crypt_buffer + message + [0] ).chars.join("")
|
30
29
|
|
31
30
|
@mac_socket.write(packet)
|
32
31
|
@mac_socket.read(16)
|
@@ -36,8 +35,9 @@ module Analyzers
|
|
36
35
|
connect unless @verify_socket
|
37
36
|
|
38
37
|
# Message-length + message-chars + tag-chars + 0
|
39
|
-
|
40
|
-
|
38
|
+
# NOTE: check why chars instead of bytes.map does not work here
|
39
|
+
packet = (message.length.to_crypt_buffer + message + tag.split("") + [0] ).bytes.map(&:chr).join("")
|
40
|
+
|
41
41
|
@verify_socket.write(packet)
|
42
42
|
@verify_socket.read(2).to_i
|
43
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crypto-toolbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis Sivia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aes
|
@@ -44,9 +44,11 @@ email: dev@d-coded.de
|
|
44
44
|
executables:
|
45
45
|
- break-vigenere-xor
|
46
46
|
- break-padding-oracle
|
47
|
+
- break-cbc-mac-variable-length
|
47
48
|
extensions: []
|
48
49
|
extra_rdoc_files: []
|
49
50
|
files:
|
51
|
+
- bin/break-cbc-mac-variable-length
|
50
52
|
- bin/break-padding-oracle
|
51
53
|
- bin/break-vigenere-xor
|
52
54
|
- lib/crypto-toolbox.rb
|