DKIM
DomainKeys Identified Mail (DKIM DomainKeys 識別済みメール)
IETF STD 76 RFC 6376
IETF DKIM Working Group
読む順? RFC 4686, 5585, 5863 → 6376
RFC 4686 Analysis of Threats Motivating DomainKeys Identified Mail (DKIM)
ドメインキー識別メール(DKIM)の脅威分析
https://tex2e.github.io/rfc-translater/html/rfc4686.html
RFC 5585 DomainKeys Identified Mail (DKIM) Service Overview
ドメインキー識別メール(DKIM)サービスの概要
https://tex2e.github.io/rfc-translater/html/rfc5585.html
RFC 5863 DomainKeys Identified Mail (DKIM) Development, Deployment, and Operations
ドメインキー識別メール(DKIM)の開発、展開、運用
https://tex2e.github.io/rfc-translater/html/rfc5863.html (Infomartial)
RFC 6376 DomainKeys Identified Mail (DKIM) Signatures
ドメインキー識別メール(DKIM)署名 DKIM-BASE
https://tex2e.github.io/rfc-translater/html/rfc6376.html
次世代?
RFC 5617 DKIM-ADSP DMARCにより廃止(HISTORIC) (Update 8553)
RFC 7960 Interoperability Issues between Domain-based Message Authentication, Reporting, and Conformance (DMARC) and Indirect Email Flows
https://tex2e.github.io/rfc-translater/html/rfc7960.html
RFC 6651
RFC 6541 DomainKeys Identified Mail (DKIM) Authorized Third-Party Signatures
RFC 8463 A New Cryptographic Signature Method for DomainKeys Identified Mail (DKIM)
https://tex2e.github.io/rfc-translater/html/rfc8463.html
Ed25519 + SHA256
RFC 8301 Cryptographic Algorithm and Key Usage Update to DomainKeys Identified Mail (DKIM)
https://tex2e.github.io/rfc-translater/html/rfc8301.html
ドメインキー識別メール(DKIM)の暗号化アルゴリズムと鍵使用法の更新
RFC 6377 DomainKeys Identified Mail (DKIM) and Mailing Lists (BCP)
https://tex2e.github.io/rfc-translater/html/rfc6377.html
ドメインキー識別メール(DKIM)とメーリングリスト
RFC 5672 廃止 → 6376 DomainKeys Identified Mail (DKIM) Signatures -- Update
RFC 4871 DomainKeys Identified Mail (DKIM) 署名 廃止 → 6376
RFC 8616 Email Authentication for Internationalized Mail
RFC 8601 Message Header Field for Indicating Message Authentication Status
https://tex2e.github.io/rfc-translater/html/rfc8601.html
メッセージ認証ステータスを示すメッセージヘッダーフィールド
RFC 8032 EdDSA
RFC 8017 RSA
RFC 7601 Message Header Field for Indicating Message Authentication Status 廃止 → RFC 8601
RFC 7001 Message Header Field for Indicating Message Authentication Status 廃止 → RFC 7601 → RFC 8601
RFC 5451 Message Header Field for Indicating Message Authentication Status 廃止 → 7001 → ... RFC 8601
RFC 4870 廃止するために書かれた旧規格 DomainKeys
なりすましメールを防ぐ技術のひとつ
ドメイン名を紐付けメールメッセージ(RFC 5322 IMFやMIME) にサーバ上でデジタル署名することでなりすましなどを防止する仕組み
SMTP,POP3,IMAPなど転送プロトコルには依存しない
似たもの
PEM→MOSS
PGP→OpenPGP
S/MIME
Sender Policy Framework (SPF)
古いもの(廃止)
RFC 4406 Sender ID
DKIMパラメータ
https://www.iana.org/assignments/dkim-parameters/dkim-parameters.xhtml
鍵 RSA (廃止まであと少し?)と RFC8463で EdDSA のEd25519 移行期間として併用することも可能
私有鍵と公開鍵のみ利用。 PKI証明書は不要
RSA
1024bit以上、検証は 512bit から 2048bit まで
e=65537 固定
ハッシュ方式
SHA1 (非推奨) または SHA256 のみ
EdDSA RFC 8463
Ed25519 + SHA256 固定
語
識別子(Identifier ID)
SDID 署名ドメイン識別子 (Signing Domain Identifier)
AUID エージェントまたはユーザ識別子 (Agent or User Identifier)
DNSのTXTレコードで公開鍵と条件等を公開し、(ヘッダに書かれる)メール本文の署名と照合できる仕組み(RSAで)
複数鍵の設定も可能
<セレクタ>._domainkey.<ドメイン> の TXT レコードに記述する。セレクタは複数作成可能
1文字タグ=値 を ; 区切りで記述
https://www.iana.org/assignments/dkim-parameters/dkim-parameters.xhtml#dkim-parameters-5
v=DKIM1 バージョン1
k=rsa または ed25519 署名方式 (省略可) https://www.iana.org/assignments/dkim-parameters/dkim-parameters.xhtml#dkim-parameters-6
a=rsa-sha256 rsa-sha1 ed25519-sha256 kと対応するもの (省略可)
p=公開鍵 RSAまたはEd25519の公開鍵 DERのBASE64 (PKCS8? PEMの中身から改行を取り除いたもの)
ヘッダ DKIM-Signature
https://www.iana.org/assignments/dkim-parameters/dkim-parameters.xhtml#dkim-parameters-1
タグ=値 を ; で区切り
v バージョン 1
a あるごりずむ https://www.iana.org/assignments/dkim-parameters/dkim-parameters.xhtml#dkim-parameters-6
RSA
送信 1024bit以上 2048bitまで 受信 512bit から 2048bit e=65537 固定
rsa-sha1 (廃止 受信のみ可)
rsa-sha256
EdDSA
ed25519
b 署名 BASE64
c 正規化方法 ヘッダ/本文 それぞれ simple と relaxed がある
S/MIME、PGP、GPGとの違い
認証局不要
DNSに公開鍵を登録する形で紐付けされる
転送方式(SMTP、IPアドレス等)には依存しない
DNS以外に依存する本人認証的なものは不可
メールヘッダに署名が書き込まれるためサーバで署名も容易
メーリングリストなどに強い?
暗号化、アーカイブは対象外
DNSに登録するのはRSA公開鍵(PEM形式からヘッダ・フッタと改行を除いたもの)
DMARCと組み合わせることで制御できたり
SPFとどちらかで認証できれば正規のメールとみなすのがいいらしい。
https://salt.iajapan.org/wpmu/anti_spam/admin/tech/rfc/rfc5672/
https://salt.iajapan.org/wpmu/anti_spam/admin/tech/explanation/dkim/