Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision a90ad6ce8f4cd876b5a8897b66ef49fb50b378cd authored by Dmitry Belyavskiy on 22 May 2020, 16:00:03 UTC, committed by Dmitry Belyavskiy on 22 May 2020, 16:00:03 UTC
Missing copyright plates
Fixes #257
1 parent 1a1047a
  • Files
  • Changes
  • 6cf1688
  • /
  • gost_grasshopper_defines.h
Raw File
Cook and download a directory from the Software Heritage Vault

You have requested the cooking of the directory with identifier None into a standard tar.gz archive.

Are you sure you want to continue ?

Download a directory from the Software Heritage Vault

You have requested the download of the directory with identifier None as a standard tar.gz archive.

Are you sure you want to continue ?

Cook and download a revision from the Software Heritage Vault

You have requested the cooking of the history heading to revision with identifier swh:1:rev:a90ad6ce8f4cd876b5a8897b66ef49fb50b378cd into a bare git archive.

Are you sure you want to continue ?

Download a revision from the Software Heritage Vault

You have requested the download of the history heading to revision with identifier swh:1:rev:a90ad6ce8f4cd876b5a8897b66ef49fb50b378cd as a bare git archive.

Are you sure you want to continue ?

Invalid Email !

The provided email is not well-formed.

Download link has expired

The requested archive is no longer available for download from the Software Heritage Vault.

Do you want to cook it again ?

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • content
revision badge
swh:1:rev:a90ad6ce8f4cd876b5a8897b66ef49fb50b378cd
content badge Iframe embedding
swh:1:cnt:79922045c000e4a904be45e0747fb2793b93ed5d
gost_grasshopper_defines.h
/*
 * Maxim Tishkov 2016
 * This file is distributed under the same license as OpenSSL
 */

#ifndef GOST_GRASSHOPPER_DEFINES_H
#define GOST_GRASSHOPPER_DEFINES_H

#if defined(__cplusplus)
extern "C" {
#endif

#include <stdbool.h>
#include <stdint.h>

# if !defined(inline) && !defined(__cplusplus)
#  if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#   define GRASSHOPPER_INLINE inline
#  elif defined(__GNUC__) && __GNUC__ >= 2
#   define GRASSHOPPER_INLINE __inline__
#   define likely(x) __builtin_expect(!!(x), 1)
#  elif defined(_MSC_VER)
#   define GRASSHOPPER_INLINE __inline
#  else
#   define GRASSHOPPER_INLINE
#  endif
# else
#  define GRASSHOPPER_INLINE inline
# endif

# if !defined(likely)
#   define likely(x) x
# endif

typedef union {
    uint8_t b[16];
    uint64_t q[2];
    uint32_t d[4];
    uint16_t w[8];
} grasshopper_w128_t;

typedef union {
    uint8_t b[32];
    uint64_t q[4];
    uint32_t d[8];
    uint16_t w[16];
    grasshopper_w128_t k[2];
} grasshopper_w256_t;

typedef struct {
    grasshopper_w256_t k;
} grasshopper_key_t;

#define GRASSHOPPER_ROUND_KEYS_COUNT 10

typedef struct {
    grasshopper_w128_t k[GRASSHOPPER_ROUND_KEYS_COUNT];
} grasshopper_round_keys_t;

extern const uint8_t grasshopper_pi[0x100];

extern const uint8_t grasshopper_pi_inv[0x100];

extern const uint8_t grasshopper_lvec[16];

#define GRASSHOPPER_BLOCK_SIZE (128/8)
#define GRASSHOPPER_KEY_SIZE (256/8)

#if defined(__cplusplus)
}
#endif

#endif
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top