Download Document - Electrical and Computer Engineering Department
Transcript
eVote Progress Report University of Puerto Rico, Mayagüez Campus • Microsoft Visual Studio 2008 • MySQL • MySQL ODBC 5.1 Driver 10.3. Phase II 10.3.1. Data Encryption Since our project manages sensitive data (i.e. voters’ personal information, current votes per candidate), encrypting the data in our database is mandatory. The Advanced Encryption Standard (AES) algorithm, also known as the Rijndael algorithm, was chosen because it’s the most popular algorithm used in symmetric key cryptography. Finally, it is also approved by the National Security Agency [1] and the National Institute of Standards and Technology [2]. We currently are using several encryption functions that are already integrated in MySQL; listed below are the functions in current use with their respective description taken from the MySQL 5.0 Reference Manual [3]. • PASSWORD(string) o Calculates and returns a password string from the plaintext password string and returns a binary string or NULL if the argument was NULL. • AES_ENCRYPT(string , key_string) and AES_DECRYPT(encrypted_string , key_string) o They allow the encryption and decryption of data using the official AES algorithm, previously known as “Rijndael”. Encoding with a 128-bit key length is used, due to the fact that it is much faster and it is secure enough for most purposes. AES_ENCRYPT() encrypts a string and returns a binary string. AES_DECRYPT() decrypts the encrypted string and returns the original string. The input arguments may be any length. If either argument is NULL, the result of this function is also NULL. Because AES is a block-level algorithm, padding is used to encode uneven length strings and so the result string length may be calculated using this formula: string _ length 16 × trunc + 1 16 If AES_DECRYPT() detects invalid data or incorrect padding, it returns NULL. However, it is possible for AES_DECRYPT() to return a non-NULL value if the input data or the key is 51