Add the FIPS197 document
[aes.git] / aes.hpp
diff --git a/aes.hpp b/aes.hpp
index 43808d4..678b689 100644 (file)
--- a/aes.hpp
+++ b/aes.hpp
@@ -5,7 +5,6 @@
 #include <cstdio>
 #include <string>
 #include <iostream>
-using namespace std;
 
 // Byte and Byte Array types
 typedef unsigned char byte;
@@ -29,9 +28,14 @@ class AES
                byteArray decrypt (const byteArray& ciphertext) const;
 
        private:
-               unsigned int Nb;
-               unsigned int Nk;
-               unsigned int Nr;
+               /* Block size in words -- Always constant in AES. */
+               static const unsigned int Nb = 4;
+
+               /* Key size in words -- can be 4, 6, or 8. */
+               const unsigned int Nk;
+
+               /* Number of rounds -- depends on key size. */
+               const unsigned int Nr;
 
                wordArray keySchedule;