What you’ve described is often referred to as a rainbow table and is generally not considered to be GDPR compliant:
Comment on Turning the Tables: How to Make Spammers Reveal Their Own IP Address
exasperation@lemm.ee 1 day agoSpit out a random e-mail address and record which e-mail address was given to each IP.
The author mentions it’s a violation of GDPR to record visitors’ IP addresses. I’m not sure that’s correct, but even so, it could be possible to make a custom encoding of literally every ipv4 address through some kind of lookup table with 256 entries, and just string together 4 of those random words to represent the entire 32-bit address space, such that “correct horse battery staple” corresponds to 192.168.1.100 or whatever.
obviouspornalt@lemmynsfw.com 20 hours ago
conorab@lemmy.conorab.com 20 hours ago
Ah you’re right about the GDPR part in the article! My bad. Signing might be the best bet in that case since it avoids storage IF you were to try and implement this kind of system.