Human verification through mouse movement analysis
View on GitHubClick the button below to test the human verification system. You have 10 seconds to pass all checks by moving your mouse naturally and hitting the targets.
The system analyzes your mouse movements in real-time using 7 independent detection checks that identify human movement characteristics:
Detects natural speed variation, acceleration, and deceleration patterns
Identifies smooth human curves vs. straight robotic line segments
Analyzes natural pauses and continuous movement flow
Interactive challenge requiring purposeful mouse control
// Download from GitHub
https://github.com/dshanklin-bv/ai-mouse-check
// Include in your HTML
<script src="ai-mouse-check.js"></script>
const checker = new AIMouseCheck({
timeout: 10000,
onSuccess: (result) => {
console.log('Human verified!', result.signature);
},
onFailure: (result) => {
console.log('Failed', result.reason);
if (result.aiDetected) {
console.log('AI detected!');
}
}
});
checker.verify();
For tamper-proof verification, send movement data to your server to generate a cryptographic signature that proves human verification occurred.
const checker = new AIMouseCheck({
onSuccess: async (result) => {
// Send movement data to server for cryptographic signing
const response = await fetch('/api/human-verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
recordId: 'task-123',
movementData: result.movementData,
clientSignature: result.signature
})
});
const { signature, timestamp } = await response.json();
console.log('Server signature:', signature);
}
});
import crypto from 'crypto';
// Secret key - store securely (env var, secrets manager)
const SECRET_KEY = process.env.VERIFICATION_SECRET;
app.post('/api/human-verify', (req, res) => {
const { recordId, movementData, clientSignature } = req.body;
// Hash the movement data
const movementHash = crypto
.createHash('sha256')
.update(JSON.stringify(movementData))
.digest('hex');
// Generate cryptographic signature
const timestamp = Date.now();
const signature = crypto
.createHmac('sha256', SECRET_KEY)
.update(`\${recordId}:\${movementHash}:\${timestamp}`)
.digest('hex');
// Store in database with the record
db.run(`
UPDATE records SET
human_verified_at = datetime('now'),
verification_signature = ?
WHERE id = ?
`, [signature, recordId]);
res.json({ verified: true, signature, timestamp });
});
-- Add verification columns to your table
ALTER TABLE records ADD COLUMN human_verified_at DATETIME;
ALTER TABLE records ADD COLUMN verification_signature TEXT;
-- Query verified records
SELECT * FROM records
WHERE human_verified_at IS NOT NULL;
function verifySignature(recordId, movementHash, timestamp, signature) {
const expected = crypto
.createHmac('sha256', SECRET_KEY)
.update(`\${recordId}:\${movementHash}:\${timestamp}`)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
HMAC signature proves the verification happened and data wasn't modified
Timestamp and signature stored with each record for compliance
Re-compute signature anytime to verify authenticity
Require human approval before marking tasks complete in project management systems
Verify human authorization for transactions, refunds, or account changes
Ensure a human reviewed and approved content before publishing
Prevent AI agents from autonomously completing sensitive operations