ファイルの暗号化ユーティリティ
cipher
- C:\Windows\system32\cipher.exe /?
Output:
NTFS パーティション上のディレクトリ [ファイル] の暗号化を表示または変更します。
CIPHER [/E | /D | /C]
[/S:ディレクトリ] [/B] [/H] [パス名 [...]]
CIPHER /K [/ECC:256|384|521]
CIPHER /R:ファイル名 [/SMARTCARD] [/ECC:256|384|521]
CIPHER /P:ファイル名.cer
CIPHER /U [/N]
CIPHER /W:ディレクトリ
CIPHER /X[:EFS ファイル] [ファイル名]
CIPHER /Y
CIPHER /ADDUSER [/CERTHASH:ハッシュ | /CERTFILE:ファイル名 | /USER:ユーザー名]
[/S:ディレクトリ] [/B] [/H] [パス名 [...]]
CIPHER /FLUSHCACHE [/SERVER:サーバー名]
CIPHER /REMOVEUSER /CERTHASH:ハッシュ
[/S:ディレクトリ] [/B] [/H] [パス名 [...]]
CIPHER /REKEY [パス名 [...]]
/B エラーが発生した場合に中断します。既定では、CIPHER は
エラーが発生しても実行を続行します。
/C 暗号化されたファイルに関する情報を表示します。
/D 指定されたファイルまたはディレクトリの暗号化を解除します。
/E 指定されたファイルまたはディレクトリを暗号化します。後で追加
されたファイルが暗号化されるようにディレクトリをマークします。
親ディレクトリが暗号化されていない場合、暗号化されたファイルは、
変更されるときに暗号化を解除されます。ファイルおよび親
ディレクトリを暗号化することをお勧めします。
/H 隠しファイルやシステム属性のファイルを表示します。既定では
これらのファイルは省略されます。
/K EFS で使用するための新しい証明書およびキーを作成します。この
オプションを指定すると、その他のオプションはすべて無視されます。
注意: 既定では、/K によって現在のグループ ポリシーに準拠する
証明書とキーが作成されます。ECC が指定されている場合、
指定のキー サイズによる自己署名証明書が作成されます。
/N このオプションは /U を指定した場合にのみ動作します。
このオプションにより、キーが更新されなくなります。ローカル
ドライブ上のすべての暗号化ファイルを探すために使用されます。
/R EFS 回復キーと証明書を作成してから、それらを .PFX ファイル
(証明書と秘密キー) と .CER ファイル (証明書のみ) に
書き込みます。管理者は、ユーザーの回復キーを作成するために
.CER の内容を EFS 回復ポリシーに追加し、個々のファイルを
回復するために .PFX ファイルをインポートすることができます。
SMARTCARD が指定されている場合は、
回復キーと証明書をスマート カードに書き込みます。
.CER ファイルが生成されます (証明書のみ)。
.PFX ファイルは生成されません。
注意: 既定では、/R は 2048 ビット RSA 回復キーと証明書を作成
します。ECC が指定されている場合、その後にキー サイズ
256、384 または 521 が指定されている必要があります。
/P 渡された証明書から、base64 でエンコードされた回復ポリシー
BLOB を作成します。この BLOB は、MDM 展開用の DRA ポリシーを
設定するために使用できます。
/S 指定されたディレクトリと、その下にあるすべてのファイルと
サブディレクトリに対して指定された操作を実行します。
/U ローカル ドライブのすべての暗号化ファイルを参照しようとします。
これにより、現在のユーザーのファイル暗号化キー、または回復キーに
変更があった場合、これらが更新されます。このオプションは
/N 以外の他のオプションでは動作しません。
/W ボリューム全体で利用可能な未使用のディスク領域から、データを削除し
ます。このオプションを選ぶと他のオプションはすべて無視されます。
ローカル ボリュームのどの場所にあるディレクトリでも指定できます。
ディレクトリがマウント ポイントである場合、または別のボリュームの
ディレクトリを指し示す場合は、そのボリュームのデータが削除されます。
/X EFS 証明書とキーのバックアップを、指定された名前のファイルに
保存します。EFS ファイルが指定されている場合は、ファイルの暗号化
に使用されている現在のユーザーの証明書のバックアップが作成され
ます。指定されていない場合は、ユーザーの現在の EFS 証明書と
キーのバックアップが作成されます。ローカル PC 上の現在の EFS 証明書の拇印を表示します。
/Y ローカル PC 上の現在の EFS 証明書の拇印を表示します。
/ADDUSER 指定された暗号化ファイルにユーザーを追加します。CERTHASH が指定
されている場合は、この SHA1 ハッシュを含む証明書が検索されます。
CERTFILE が指定されている場合は、ファイルから証明書が抽出
されます。USER が指定されている場合、CIPHER は Active Directory
ドメイン サービス内でユーザー証明書を検索します。
/FLUSHCACHE
指定されたサーバー上で、呼び出し元ユーザーの EFS キーのキャッシュ
をクリアします。サーバー名が指定されていない場合は、ローカル
コンピューター上の呼び出し元ユーザーのキー キャッシュがクリアされます。
/REKEY 指定した暗号化ファイルを、構成済みの EFS の現在のキーを使用する
ように更新します。
/REMOVEUSER
指定されたファイルからユーザーを削除します。CERTHASH
は削除する証明書の SHA1 ハッシュである必要があります。
ディレクトリ ディレクトリのパスです。
ファイル名 拡張子を伴わないファイル名です。
パス名 パターン、ファイル、またはディレクトリを指定します。
EFS ファイル 暗号化されたファイルのパスです。
パラメーターを指定せずに CIPHER を実行すると、現在のディレクトリとディレク
トリに含まれるすべてのファイルの暗号化状態を表示します。複数のディレクトリ
名やワイルドカードを指定できます。複数のパラメーターはスペースで区切ります。
Displays or alters the encryption of directories [files] on NTFS partitions.
CIPHER [/E | /D | /C]
[/S:directory] [/B] [/H] [pathname [...]]
CIPHER /K [/ECC:256|384|521]
CIPHER /R:filename [/SMARTCARD] [/ECC:256|384|521]
CIPHER /P:filename.cer
CIPHER /U [/N]
CIPHER /W:directory
CIPHER /X[:efsfile] [filename]
CIPHER /Y
CIPHER /ADDUSER [/CERTHASH:hash | /CERTFILE:filename | /USER:username]
[/S:directory] [/B] [/H] [pathname [...]]
CIPHER /FLUSHCACHE [/SERVER:servername]
CIPHER /REMOVEUSER /CERTHASH:hash
[/S:directory] [/B] [/H] [pathname [...]]
CIPHER /REKEY [pathname [...]]
/B Abort if an error is encountered. By default, CIPHER continues
executing even if errors are encountered.
/C Displays information on the encrypted file.
/D Decrypts the specified files or directories.
/E Encrypts the specified files or directories. Directories will be
marked so that files added afterward will be encrypted. The
encrypted file could become decrypted when it is modified if the
parent directory is not encrypted. It is recommended that you
encrypt the file and the parent directory.
/H Displays files with the hidden or system attributes. These files
are omitted by default.
/K Creates a new certificate and key for use with EFS. If this
option is chosen, all the other options will be ignored.
Note: By default, /K creates a certificate and key that conform
to current group policy. If ECC is specified, a self-signed
certificate will be created with the supplied key size.
/N This option only works with /U. This will prevent keys being
updated. This is used to find all the encrypted files on the
local drives.
/R Generates an EFS recovery key and certificate, then writes them
to a .PFX file (containing certificate and private key) and a
.CER file (containing only the certificate). An administrator may
add the contents of the .CER to the EFS recovery policy to create
the recovery key for users, and import the .PFX to recover
individual files. If SMARTCARD is specified, then writes the
recovery key and certificate to a smart card. A .CER file is
generated (containing only the certificate). No .PFX file is
generated.
Note: By default, /R creates an 2048-bit RSA recovery key and
certificate. If ECC is specified, it must be followed by a
key size of 256, 384, or 521.
/P Creates a base64-encoded recovery-policy blob from the passed-in
certificate. This blob can be used to set DRA policy for
MDM deployments.
/S Performs the specified operation on the given directory and all
files and subdirectories within it.
/U Tries to touch all the encrypted files on local drives. This will
update user's file encryption key or recovery keys to the current
ones if they are changed. This option does not work with other
options except /N.
/W Removes data from available unused disk space on the entire
volume. If this option is chosen, all other options are ignored.
The directory specified can be anywhere in a local volume. If it
is a mount point or points to a directory in another volume, the
data on that volume will be removed.
/X Backup EFS certificate and keys into file filename. If efsfile is
provided, the current user's certificate(s) used to encrypt the
file will be backed up. Otherwise, the user's current EFS
certificate and keys will be backed up.
/Y Displays your current EFS certificate thumbprint on the local PC.
/ADDUSER Adds a user to the specified encrypted file(s). If CERTHASH is
provided, cipher will search for a certificate with this SHA1
hash. If CERTFILE is provided, cipher will extract the
certificate from the file. If USER is provided, cipher will
try to locate the user's certificate in Active Directory Domain
Services.
/FLUSHCACHE
Clears the calling user's EFS key cache on the specified server.
If servername is not provided, cipher clears the user's key cache
on the local machine.
/REKEY Updates the specified encrypted file(s) to use the configured
EFS current key.
/REMOVEUSER
Removes a user from the specified file(s). CERTHASH must be the
SHA1 hash of the certificate to remove.
directory A directory path.
filename A filename without extensions.
pathname Specifies a pattern, file or directory.
efsfile An encrypted file path.
Used without parameters, CIPHER displays the encryption state of the
current directory and any files it contains. You may use multiple directory
names and wildcards. You must put spaces between multiple parameters.
Return Code: 1
C:\Windows\system32\cipher.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
| File | Info |
|---|---|
| File Size | 49664bytes |
| Creation Time | 2019/12/07 18:08:52 |
| LastWrite Time | 2019/12/07 18:08:52 |
| ProductVersion | 10.0.19041.1889 |
| FileVersion | 10.0.19041.1889 (WinBuild.160101.0800) |
| Hash | Value |
|---|---|
| MD5 | f3471ddb5ae8e057f1b908a50e4aad7c |
| SHA1 | 12b08c7a6a36d5624c2d7f40784c26a3607fa89b |
| SHA224 | 83c8cf52d7e0b7e5a6d5adf075baa2ff4384b081e7f4fd516478ee7b |
| SHA256 | a6b2cfde3e3de872d9edd6a16710ed6c8ee32a0dfcf57322b27b3da8d18ae71a |
| SHA384 | eb632bf7ae1dac972f8085b154917e08ff45cfd819e0f715828a790c03f9a70e4630c3a2ef3b6c825fc591d4adce7f57 |
| SHA512 | 9bea40d52e4c36fdad0e4ff02d6534737a0729e3bee34da0aa2bd5b74c966be0868b638ae28cc8168127e59cc35368d508bf5ca379be1e5c49824f05dbc85df5 |