nuttx-update/include/crypto/poly1305.h
Alin Jerpelea b95414e6ba include/crypto/poly1305: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-17 08:37:13 +08:00

36 lines
1 KiB
C

/****************************************************************************
* include/crypto/poly1305.h
*
* SPDX-License-Identifier: NuttX-PublicDomain
*
* Public Domain poly1305 from Andrew Moon
*
****************************************************************************/
#ifndef __INCLUDE_CRYPTO_POLY1305_H
#define __INCLUDE_CRYPTO_POLY1305_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <sys/types.h>
#define poly1305_block_size 16
typedef struct poly1305_state
{
unsigned long r[5];
unsigned long h[5];
unsigned long pad[4];
size_t leftover;
unsigned char buffer[poly1305_block_size];
unsigned char final;
} poly1305_state;
void poly1305_begin(FAR poly1305_state *, FAR const unsigned char *);
void poly1305_update(FAR poly1305_state *,
FAR const unsigned char *, size_t);
void poly1305_finish(FAR poly1305_state *, FAR unsigned char *);
#endif /* __INCLUDE_CRYPTO_POLY1305_H */