選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ed25519.h 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. /*-
  2. * Copyright 2016 Vsevolod Stakhov
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef SRC_LIBCRYPTOBOX_ED25519_ED25519_H_
  17. #define SRC_LIBCRYPTOBOX_ED25519_ED25519_H_
  18. #include "config.h"
  19. #include <stdbool.h>
  20. #include <stddef.h>
  21. const char* ed25519_load (void);
  22. void ed25519_keypair (unsigned char *pk, unsigned char *sk);
  23. void ed25519_seed_keypair (unsigned char *pk, unsigned char *sk, unsigned char *seed);
  24. void ed25519_sign (unsigned char *sig, size_t *siglen_p,
  25. const unsigned char *m, size_t mlen,
  26. const unsigned char *sk);
  27. bool ed25519_verify (const unsigned char *sig,
  28. const unsigned char *m,
  29. size_t mlen,
  30. const unsigned char *pk);
  31. #endif /* SRC_LIBCRYPTOBOX_ED25519_ED25519_H_ */