v2 pre-release

This commit is contained in:
Zhi Guan
2017-12-07 23:58:48 +08:00
parent a569601747
commit f5a3f271a3
45 changed files with 5567 additions and 7247 deletions

View File

@@ -73,6 +73,7 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
#include <stdio.h>
#include <string.h>
#include <openssl/crypto.h>
#include <openssl/serpent.h>
@@ -267,8 +268,8 @@ void serpent_set_decrypt_key(serpent_key_t *key, const unsigned char *user_key)
void serpent_encrypt(const void *in, void *out, serpent_key_t *key)
{
int8_t i;
memcpy(out, in, SERPENT_BLOCK_SIZE);
serpent_blk *_out = out;
memcpy(out, in, SERPENT_BLOCK_SIZE);
i = 0;
for (;;) {
@@ -287,9 +288,9 @@ void serpent_encrypt(const void *in, void *out, serpent_key_t *key)
void serpent_decrypt(const void *in, void *out, serpent_key_t *key)
{
int8_t i;
serpent_blk *_out = out;
memcpy(out, in, SERPENT_BLOCK_SIZE);
serpent_blk *_out = out;
i = SERPENT_ROUNDS;
serpent_whiten(_out, key, i);