diff --git a/ChangeLog b/ChangeLog
index 5086e171112446af566e51f394688d963d971181..cd7ca286dbd04f7d41e925f74f63eae8304292c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-05-17  Niels Möller  <nisse@lysator.liu.se>
 
+	* aes.h (struct aes_ctx): Renamed nrounds to rounds, and moved
+	first in the structure.
+	* aes-set-encrypt-key.c (aes_set_encrypt_key): Updated for renaming.
+	* aes-set-decrypt-key.c (aes_invert_key): Likewise.
+
 	* aes-encrypt-internal.c (_nettle_aes_encrypt): Take rounds and
 	subkeys as separate arguments, not a struct aes_ctx *. Updated
 	callers.
diff --git a/aes-decrypt.c b/aes-decrypt.c
index d83a69526e7d3288bd0b049f90d1319d4af3060c..d08eac348752ca9743c17d3742845b6ad8f1e0bb 100644
--- a/aes-decrypt.c
+++ b/aes-decrypt.c
@@ -342,6 +342,6 @@ aes_decrypt(const struct aes_ctx *ctx,
 	    const uint8_t *src)
 {
   assert(!(length % AES_BLOCK_SIZE) );
-  _aes_decrypt(ctx->nrounds, ctx->keys, &_aes_decrypt_table,
+  _aes_decrypt(ctx->rounds, ctx->keys, &_aes_decrypt_table,
 	       length, dst, src);
 }
diff --git a/aes-encrypt.c b/aes-encrypt.c
index 5ee1a49b5d85ebc3c4ad5eddfefad03e8eaf70b1..0077693a2b410d7c1e7d8c14c4abb3d908737694 100644
--- a/aes-encrypt.c
+++ b/aes-encrypt.c
@@ -40,6 +40,6 @@ aes_encrypt(const struct aes_ctx *ctx,
 	    const uint8_t *src)
 {
   assert(!(length % AES_BLOCK_SIZE) );
-  _aes_encrypt(ctx->nrounds, ctx->keys, &_aes_encrypt_table,
+  _aes_encrypt(ctx->rounds, ctx->keys, &_aes_encrypt_table,
 	       length, dst, src);
 }
diff --git a/aes-set-decrypt-key.c b/aes-set-decrypt-key.c
index 04e4c992087b303278a911b0739c5f68e6eae6a1..f8e8ef71647afe1e520bec90d0332057d3befba4 100644
--- a/aes-set-decrypt-key.c
+++ b/aes-set-decrypt-key.c
@@ -126,10 +126,10 @@ void
 aes_invert_key(struct aes_ctx *dst,
 	       const struct aes_ctx *src)
 {
-  unsigned nrounds;
+  unsigned rounds;
   unsigned i;
 
-  nrounds = src->nrounds;
+  rounds = src->rounds;
 
   /* Reverse the order of subkeys, in groups of 4. */
   /* FIXME: Instead of reordering the subkeys, change the access order
@@ -138,7 +138,7 @@ aes_invert_key(struct aes_ctx *dst,
     {
       unsigned j, k;
 
-      for (i = 0, j = nrounds * 4;
+      for (i = 0, j = rounds * 4;
 	   i < j;
 	   i += 4, j -= 4)
 	for (k = 0; k<4; k++)
@@ -148,14 +148,14 @@ aes_invert_key(struct aes_ctx *dst,
     {
       unsigned k;
 
-      dst->nrounds = nrounds;
-      for (i = 0; i <= nrounds * 4; i += 4)
+      dst->rounds = rounds;
+      for (i = 0; i <= rounds * 4; i += 4)
 	for (k = 0; k < 4; k++)
-	  dst->keys[i+k] = src->keys[nrounds * 4 - i + k];
+	  dst->keys[i+k] = src->keys[rounds * 4 - i + k];
     }
 
   /* Transform all subkeys but the first and last. */
-  for (i = 4; i < 4 * nrounds; i++)
+  for (i = 4; i < 4 * rounds; i++)
     MIX_COLUMN (mtable, dst->keys[i]);
 }
 
diff --git a/aes-set-encrypt-key.c b/aes-set-encrypt-key.c
index 04f53270f38c8cef3ab54f63da0bcb6ae67601fd..d96a8ebcb35537f5dfa844d317c81ad39c8de7f6 100644
--- a/aes-set-encrypt-key.c
+++ b/aes-set-encrypt-key.c
@@ -61,7 +61,7 @@ aes_set_encrypt_key(struct aes_ctx *ctx,
   }
 
   lastkey = (AES_BLOCK_SIZE/4) * (nr + 1);
-  ctx->nrounds = nr;
+  ctx->rounds = nr;
 
   for (i=0, rp = rcon; i<nk; i++)
     ctx->keys[i] = LE_READ_UINT32(key + i*4);
diff --git a/aes.h b/aes.h
index b3bb965912b9e65070c4cfc20e4a7d8f824f69fc..d26c001370fb5c924a2e4301b2122c0c061a6d50 100644
--- a/aes.h
+++ b/aes.h
@@ -53,8 +53,8 @@ extern "C" {
    sizes? */
 struct aes_ctx
 {
+  unsigned rounds;  /* number of rounds to use for our key size */
   uint32_t keys[60];  /* maximum size of key schedule */
-  unsigned  nrounds;  /* number of rounds to use for our key size */
 };
 
 void