Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e98d2712
Commit
e98d2712
authored
Jan 03, 2005
by
Michael Jung
Committed by
Alexandre Julliard
Jan 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small bugfixes backported from the LibTomCrypt v1.0rc1 release.
parent
2a4b6fdc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
mpi.c
dlls/rsaenh/mpi.c
+3
-3
rsa.c
dlls/rsaenh/rsa.c
+3
-1
No files found.
dlls/rsaenh/mpi.c
View file @
e98d2712
...
...
@@ -3257,7 +3257,7 @@ int mp_prime_random_ex(mp_int *a, int t, int size, int flags, ltm_prime_callback
}
/* calc the byte size */
bsize
=
(
size
>>
3
)
+
(
size
&
7
?
1
:
0
);
bsize
=
(
size
>>
3
)
+
(
(
size
&
7
)
?
1
:
0
);
/* we need a buffer of bsize bytes */
tmp
=
malloc
(
bsize
);
...
...
@@ -3266,11 +3266,11 @@ int mp_prime_random_ex(mp_int *a, int t, int size, int flags, ltm_prime_callback
}
/* calc the maskAND value for the MSbyte*/
maskAND
=
0xFF
>>
(
8
-
(
size
&
7
));
maskAND
=
((
size
&
7
)
==
0
)
?
0xFF
:
(
0xFF
>>
(
8
-
(
size
&
7
)));
/* calc the maskOR_msb */
maskOR_msb
=
0
;
maskOR_msb_offset
=
(
size
-
2
)
>>
3
;
maskOR_msb_offset
=
(
(
size
&
7
)
==
1
)
?
1
:
0
;
if
(
flags
&
LTM_PRIME_2MSB_ON
)
{
maskOR_msb
|=
1
<<
((
size
-
2
)
&
7
);
}
else
if
(
flags
&
LTM_PRIME_2MSB_OFF
)
{
...
...
dlls/rsaenh/rsa.c
View file @
e98d2712
...
...
@@ -73,7 +73,9 @@ int rand_prime(mp_int *N, long len)
type
=
LTM_PRIME_BBS
;
len
=
-
len
;
}
else
{
type
=
0
;
/* This seems to be what MS CSP's do: */
type
=
LTM_PRIME_2MSB_ON
;
/* Original LibTomCrypt: type = 0; */
}
/* New prime generation makes the code even more cryptoish-insane. Do you know what this means!!!
...
...
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