aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/block/seed/seed.cpp2
-rw-r--r--src/lib/entropy/entropy_srcs.cpp3
-rw-r--r--src/lib/modes/aead/siv/siv.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/block/seed/seed.cpp b/src/lib/block/seed/seed.cpp
index 6e0aaa41f..24afed67d 100644
--- a/src/lib/block/seed/seed.cpp
+++ b/src/lib/block/seed/seed.cpp
@@ -195,7 +195,7 @@ const u32bit SEED_S3[256] = {
/*
* SEED G Function
*/
-u32bit SEED_G(u32bit X)
+inline u32bit SEED_G(u32bit X)
{
return (SEED_S0[get_byte(3, X)] ^ SEED_S1[get_byte(2, X)] ^
SEED_S2[get_byte(1, X)] ^ SEED_S3[get_byte(0, X)]);
diff --git a/src/lib/entropy/entropy_srcs.cpp b/src/lib/entropy/entropy_srcs.cpp
index 22d2e5e4b..ad84709a5 100644
--- a/src/lib/entropy/entropy_srcs.cpp
+++ b/src/lib/entropy/entropy_srcs.cpp
@@ -95,11 +95,12 @@ std::unique_ptr<Entropy_Source> Entropy_Source::create(const std::string& name)
{
#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM)
return std::unique_ptr<Entropy_Source>(new Device_EntropySource(BOTAN_SYSTEM_RNG_POLL_DEVICES));
+#endif
}
if(name == "win32_cryptoapi")
{
-#elif defined(BOTAN_HAS_ENTROPY_SRC_CAPI)
+#if defined(BOTAN_HAS_ENTROPY_SRC_CAPI)
return std::unique_ptr<Entropy_Source>(new Win32_CAPI_EntropySource);
#endif
}
diff --git a/src/lib/modes/aead/siv/siv.cpp b/src/lib/modes/aead/siv/siv.cpp
index 9e638b659..5f8c13f7f 100644
--- a/src/lib/modes/aead/siv/siv.cpp
+++ b/src/lib/modes/aead/siv/siv.cpp
@@ -18,6 +18,8 @@ SIV_Mode::SIV_Mode(BlockCipher* cipher) :
m_ctr(new CTR_BE(cipher->clone())),
m_cmac(new CMAC(cipher))
{
+ if(cipher->block_size() != 16)
+ throw Invalid_Argument("SIV requires a 128 bit block cipher");
}
void SIV_Mode::clear()