Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
3f1403b9
Commit
3f1403b9
authored
Mar 15, 2016
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blowfish: Use READ_UINT32 macro.
parent
402c2711
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
ChangeLog
ChangeLog
+4
-0
blowfish.c
blowfish.c
+4
-4
No files found.
ChangeLog
View file @
3f1403b9
2016-03-15 Niels Möller <nisse@lysator.liu.se>
* blowfish.c (blowfish_encrypt, blowfish_decrypt): Use READ_UINT32
macro. Fixes an undefined shift, reported by Nikos
Mavrogiannopoulos.
From Nikos Mavrogiannopoulos.
* configure.ac (HOGWEED_EXTRA_SYMBOLS): Add "mp_*", when building
with mini-gmp.
...
...
blowfish.c
View file @
3f1403b9
...
...
@@ -337,8 +337,8 @@ blowfish_encrypt (const struct blowfish_ctx *ctx,
{
uint32_t
d1
,
d2
;
d1
=
src
[
0
]
<<
24
|
src
[
1
]
<<
16
|
src
[
2
]
<<
8
|
src
[
3
]
;
d2
=
src
[
4
]
<<
24
|
src
[
5
]
<<
16
|
src
[
6
]
<<
8
|
src
[
7
]
;
d1
=
READ_UINT32
(
src
)
;
d2
=
READ_UINT32
(
src
+
4
)
;
encrypt
(
ctx
,
&
d1
,
&
d2
);
dst
[
0
]
=
(
d1
>>
24
)
&
0xff
;
dst
[
1
]
=
(
d1
>>
16
)
&
0xff
;
...
...
@@ -359,8 +359,8 @@ blowfish_decrypt (const struct blowfish_ctx *ctx,
{
uint32_t
d1
,
d2
;
d1
=
src
[
0
]
<<
24
|
src
[
1
]
<<
16
|
src
[
2
]
<<
8
|
src
[
3
]
;
d2
=
src
[
4
]
<<
24
|
src
[
5
]
<<
16
|
src
[
6
]
<<
8
|
src
[
7
]
;
d1
=
READ_UINT32
(
src
)
;
d2
=
READ_UINT32
(
src
+
4
)
;
decrypt
(
ctx
,
&
d1
,
&
d2
);
dst
[
0
]
=
(
d1
>>
24
)
&
0xff
;
dst
[
1
]
=
(
d1
>>
16
)
&
0xff
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment