IoTIVP-Verify evaluates IoTIVP-Core packets to determine:
- 🔒 Valid / Invalid
- 📊 Integrity Score (0–100)
- 🚩 Flags (hash mismatch, replay, anomalies, etc.)
- 🔎 Behavior-level insights
| Dimension | Weight |
|---|---|
| Hash Validity | 0.40 |
| Timestamp Freshness | 0.20 |
| Nonce Behavior | 0.15 |
| Value Anomalies | 0.15 |
| Device Behavior | 0.10 |
If hash fails → score = 0 immediately.
from iotivp_verify import verify_packet, VerifyConfig
cfg = VerifyConfig(max_age_seconds=60)
result = verify_packet(
packet_json,
secret=b"demo-secret",
cfg=cfg
)
print(result){
"valid": true,
"integrity_score": 94,
"flags": {
"hash_mismatch": false,
"timestamp_expired": false,
"nonce_reuse": false,
"value_out_of_range": []
}
}- ✔ Hash correctness
- ✔ Timestamp expiration
- ✔ Nonce replay detection
- ✔ Field anomaly detection
- ✔ Device behavior deviation
IoTIVP-Verify converts raw sensor data into trusted intelligence.