Define and validate data formats for Right to be Forgotten requests compliant with GDPR Article 17
Cryptographic proof of deletion with verifiable certificates
{
"certificateId": "CERT-DEL-2025-12345",
"requestId": "REQ-2025-67890",
"dataSubject": {
"hash": "sha256:a1b2c3d4...", // Hashed identifier
"jurisdiction": "EU"
},
"deletionDetails": {
"categoriesDeleted": ["profile", "activity", "communications"],
"recordsDeleted": 1247,
"storageLocations": ["primary_db", "backup_db", "cache", "cdn"],
"completionTimestamp": "2025-12-25T15:45:00Z"
},
"verification": {
"method": "merkle_proof",
"merkleRoot": "0x1a2b3c4d...",
"proofChain": [...],
"witnessSignatures": [...]
},
"cryptographicProof": {
"algorithm": "ED25519",
"signature": "...",
"publicKey": "..."
},
"auditTrail": {
"initiatedBy": "data_subject",
"approvedBy": "dpo@company.com",
"verifiedBy": "third_party_auditor",
"chainOfCustody": [...]
}
}
Cryptographic and technical methods for data erasure and verification
function secureErase(data: PersonalData): DeletionProof {
// 1. Data Discovery - Find all copies
const locations = await discoverAllDataLocations(data.userId);
// 2. Multi-pass Overwrite (DoD 5220.22-M standard)
for (const location of locations) {
await overwriteWithPattern(location, RANDOM_PATTERN);
await overwriteWithPattern(location, COMPLEMENT_PATTERN);
await overwriteWithPattern(location, RANDOM_PATTERN);
await verifyOverwrite(location);
}
// 3. Generate Merkle proof of deletion
const merkleProof = generateMerkleProof(locations);
// 4. Create cryptographic certificate
return {
deletionHash: sha256(locations + timestamp),
merkleRoot: merkleProof.root,
signature: sign(privateKey, merkleProof.root)
};
}
function blockchainErasure(encryptedData: string, keyId: string): void {
// Challenge: Blockchain is immutable
// Solution: Destroy encryption keys, making data unrecoverable
// 1. Verify data is encrypted on-chain
assert(isEncrypted(encryptedData));
// 2. Provably destroy encryption key
const keyDestructionProof = await destroyKeyWithProof(keyId);
// 3. Record key destruction on-chain
await recordKeyDestruction(keyId, keyDestructionProof);
// 4. Data remains on blockchain but is cryptographically erased
// (cannot be decrypted without the key)
return {
status: "cryptographically_erased",
proof: keyDestructionProof,
timestamp: Date.now()
};
}
async function requestSearchDelisting(
url: string,
reason: DelistingReason
): Promise {
// 1. Submit delisting request to search engines
const requests = await Promise.all([
submitToGoogle(url, reason),
submitToBing(url, reason),
submitToOtherEngines(url, reason)
]);
// 2. Monitor delisting status
const monitor = setInterval(async () => {
const stillIndexed = await checkIndexStatus(url);
if (!stillIndexed) {
clearInterval(monitor);
generateDelistingCertificate(url);
}
}, 3600000); // Check hourly
// 3. Verify with cache checks
await verifyCacheRemoval(url);
return { status: "pending", trackingIds: requests };
}
End-to-end protocol for deletion request processing and verification
// Solidity Smart Contract for Deletion Verification
contract DeletionRegistry {
struct DeletionRecord {
bytes32 requestHash;
address dataController;
uint256 timestamp;
bytes32 merkleRoot;
bool verified;
}
mapping(bytes32 => DeletionRecord) public deletions;
event DeletionRecorded(
bytes32 indexed requestHash,
address indexed dataController,
uint256 timestamp
);
function recordDeletion(
bytes32 requestHash,
bytes32 merkleRoot,
bytes memory signature
) public {
require(verifySignature(requestHash, signature), "Invalid signature");
deletions[requestHash] = DeletionRecord({
requestHash: requestHash,
dataController: msg.sender,
timestamp: block.timestamp,
merkleRoot: merkleRoot,
verified: true
});
emit DeletionRecorded(requestHash, msg.sender, block.timestamp);
}
function verifyDeletion(bytes32 requestHash) public view returns (bool) {
return deletions[requestHash].verified;
}
}
Integrate Right to be Forgotten capabilities into your systems
import { RightToBeForgettenClient } from '@wia/rtbf-sdk';
// Initialize client
const rtbf = new RightToBeForgettenClient({
apiKey: 'your-api-key',
jurisdiction: 'EU',
environment: 'production'
});
// Submit deletion request
const request = await rtbf.submitDeletionRequest({
dataSubject: {
email: 'user@example.com',
userId: 'user_12345',
verification: {
method: 'email_otp',
code: '123456'
}
},
categories: ['profile', 'activity', 'communications'],
reason: 'gdpr_article17_withdrawal_of_consent',
jurisdiction: 'EU'
});
console.log('Request ID:', request.id);
console.log('Status:', request.status);
// Check deletion status
const status = await rtbf.checkStatus(request.id);
console.log('Progress:', status.progress); // 0-100%
console.log('Stage:', status.currentStage); // e.g., "data_discovery"
// Retrieve deletion certificate
if (status.completed) {
const certificate = await rtbf.getCertificate(request.id);
console.log('Certificate:', certificate);
// Verify certificate
const isValid = await rtbf.verifyCertificate(certificate);
console.log('Valid:', isValid);
}
POST https://api.wia.org/v1/rtbf/deletion-request
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"dataSubject": {
"email": "user@example.com",
"userId": "user_12345"
},
"categories": ["profile", "activity"],
"reason": "gdpr_article17",
"verification": {
"method": "email_otp",
"code": "123456"
}
}
Response:
{
"requestId": "REQ-2025-12345",
"status": "processing",
"estimatedCompletion": "2025-12-30T10:00:00Z",
"trackingUrl": "https://rtbf.wia.org/track/REQ-2025-12345"
}
// Google Search Console API
const googleDelisting = await rtbf.searchEngine.requestDelisting({
engine: 'google',
urls: [
'https://example.com/user/profile/12345',
'https://example.com/posts/by/user12345'
],
reason: 'gdpr_right_to_be_forgotten',
jurisdiction: 'EU',
dataSubject: {
name: 'John Doe',
verification: {...}
}
});
// Monitor delisting status
const delistingStatus = await rtbf.searchEngine.checkDelisting(
googleDelisting.requestId
);
console.log('Delisted:', delistingStatus.delisted);
console.log('Cache cleared:', delistingStatus.cacheCleared);
Simulate a complete deletion request workflow
| Request ID | Data Subject | Status | Records Deleted | Completion |
|---|---|---|---|---|
| REQ-2025-001 | user_***45 | Completed | 1,247 | 7 days |
| REQ-2025-002 | user_***67 | Processing | - | 3 days |
| REQ-2025-003 | user_***89 | Completed | 892 | 5 days |
| REQ-2025-004 | user_***12 | Legal Review | - | 14 days |