Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 54854)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 54855)
@@ -14768,6 +14768,6 @@
       <param name="newPassword" type="wstring" dir="in">
         <desc>
-          The new password the medium should be protected with. Use an empty string
-          to indicate that the result should not be encrypted.
+          The new password the medium should be protected with. An empty password and password ID
+          will result in the medium being encrypted with the current password.
         </desc>
       </param>
Index: /trunk/src/VBox/Main/src-server/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 54854)
+++ /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 54855)
@@ -8937,4 +8937,5 @@
         char *pszKeyStoreEncNew = NULL;
         void *pvBuf = NULL;
+        const char *pszPasswordNew = NULL;
         try
         {
@@ -8972,14 +8973,22 @@
             if (task.mstrCipher.isNotEmpty())
             {
-                if (task.mstrNewPassword.isEmpty())
+                if (   task.mstrNewPassword.isEmpty()
+                    && task.mstrNewPasswordId.isEmpty()
+                    && task.mstrCurrentPassword.isNotEmpty())
+                {
+                    /* An empty password and password ID will default to the current password. */
+                    pszPasswordNew = task.mstrCurrentPassword.c_str();
+                }
+                else if (task.mstrNewPassword.isEmpty())
                     throw setError(VBOX_E_OBJECT_NOT_FOUND,
                                    tr("A password must be given for the image encryption"));
-
-                if (task.mstrNewPasswordId.isEmpty())
+                else if (task.mstrNewPasswordId.isEmpty())
                     throw setError(VBOX_E_INVALID_OBJECT_STATE,
                                    tr("A valid identifier for the password must be given"));
+                else
+                    pszPasswordNew = task.mstrNewPassword.c_str();
 
                 i_taskEncryptSettingsSetup(&CryptoSettingsWrite, task.mstrCipher.c_str(), NULL,
-                                           task.mstrNewPassword.c_str(), true /* fCreateKeyStore */);
+                                           pszPasswordNew, true /* fCreateKeyStore */);
                 vrc = VDFilterAdd(pDisk, "CRYPT", VD_FILTER_FLAGS_WRITE, CryptoSettingsWrite.vdFilterIfaces);
                 if (RT_FAILURE(vrc))
@@ -8990,5 +8999,5 @@
             else if (task.mstrNewPasswordId.isNotEmpty() || task.mstrNewPassword.isNotEmpty())
                 throw setError(VBOX_E_INVALID_OBJECT_STATE,
-                               tr("The password and password identifier must be empty if there is the output shuld be unencrypted"));
+                               tr("The password and password identifier must be empty if the output should be unencrypted"));
 
             /* Open all media in the chain. */
@@ -9044,12 +9053,16 @@
                 pBase->m->mapProperties.erase(it);
 
-            it = pBase->m->mapProperties.find("CRYPT/KeyId");
-            if (it != pBase->m->mapProperties.end())
-                pBase->m->mapProperties.erase(it);
+            if (task.mstrNewPasswordId.isNotEmpty())
+            {
+                it = pBase->m->mapProperties.find("CRYPT/KeyId");
+                if (it != pBase->m->mapProperties.end())
+                    pBase->m->mapProperties.erase(it);
+            }
 
             if (CryptoSettingsWrite.pszKeyStore)
             {
                 pBase->m->mapProperties["CRYPT/KeyStore"] = Utf8Str(CryptoSettingsWrite.pszKeyStore);
-                pBase->m->mapProperties["CRYPT/KeyId"] = task.mstrNewPasswordId;
+                if (task.mstrNewPasswordId.isNotEmpty())
+                    pBase->m->mapProperties["CRYPT/KeyId"] = task.mstrNewPasswordId;
             }
 
@@ -9074,6 +9087,4 @@
                        tr("Encryption is not supported because extension pack support is not built in"));
 # endif
-
-
     }
     catch (HRESULT aRC) { rc = aRC; }
