diff --git a/des.c b/des.c
index 365113c0ede6778cc6394cf775f0fda5fd169f95..ce25f8ac23e07fb450597861e71a839914ca3a60 100644
--- a/des.c
+++ b/des.c
@@ -209,7 +209,8 @@ des_encrypt(struct des_ctx *ctx,
 	    const uint8_t *src)
 {
   assert(!(length % DES_BLOCK_SIZE));
-
+  assert(ctx->status == DES_OK);
+  
   while (length)
     {
       DesSmallFipsEncrypt(dst, ctx->key, src);
@@ -225,6 +226,7 @@ des_decrypt(struct des_ctx *ctx,
 	    const uint8_t *src)
 {
   assert(!(length % DES_BLOCK_SIZE));
+  assert(ctx->status == DES_OK);
 
   while (length)
     {