St Andrews University computer science student Benjamin Birt was so concerned about the way some social networking sites collect and trade in personal data that he has developed his own software program, which guarantees to protect users' information.
Now Ben's software - PeerBook - is one of a number of alternatives poised to challenge the global dominance of sites such as Facebook.
Facebook and similar sites have been criticised on a range of issues, especially the privacy of their users, child safety, the use of advertising scripts, data-mining and the inability to terminate accounts without first manually deleting all the content.
"Facebook and other social networks are growing in popularity by the day," said Ben, who graduated from St Andrews last week.
"However, since virtually none of them is centrally located inside the EU, they are subject to little or no data protection legislation, and as such can legally sell their customers' data to third-party organisations."
In the US, these concerns have spawned growing public interest in possible alternatives. A group of students who launched a web campaign for funding to build an alternative social networking service - Diaspora - was flooded with nearly $200,000 (pound;134,262) and messages of support, although they haven't written the program or proved it works yet.
In Scotland, Ben (pictured) is already several stages ahead. He has built a prototype of PeerBook, proved it works and has had its security robustly tested. "PeerBook does what Facebook can't," he said.
"First, there's no central control of users' data - personal information stays personal and is only shared with people whom the user wants to contact. Second, when personal information is sent from one friend to another, the data is encrypted using a complex set of encryption standards. It can only be read by PeerBook users."
Ben plans to spend the summer refining and testing the software. He will then make it available for free on the web.