Skip to content

Commit

Permalink
correct function signature of verify routine, for all sphincs+ instan…
Browse files Browse the repository at this point in the history
…tiations

Signed-off-by: Anjan Roy <hello@itzmeanjan.in>
  • Loading branch information
itzmeanjan committed Dec 15, 2023
1 parent bbda40c commit d33832e
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions include/sphincs+_128f_robust.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_128f_simple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_128s_robust.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_128s_simple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_192f_robust.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_192f_simple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_192s_robust.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_192s_simple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_256f_robust.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_256f_simple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_256s_robust.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}
4 changes: 2 additions & 2 deletions include/sphincs+_256s_simple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ sign(const uint8_t* const __restrict msg, // message to be signed
sphincs_plus::sign<n, h, d, a, k, w, v>(msg, mlen, skey, rand_bytes, sig);
}

inline void
inline bool
verify(const uint8_t* const __restrict msg, // message which was signed
const size_t mlen, // byte length of message
const uint8_t* const __restrict sig, // SPHINCS+ signature
const uint8_t* const __restrict pkey // SPHINCS+ public key of 2*n -bytes
)
{
sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
return sphincs_plus::verify<n, h, d, a, k, w, v>(msg, mlen, sig, pkey);
}

}

0 comments on commit d33832e

Please sign in to comment.