Home All Groups Group Topic Archive Search About

Scramble Integer column?

Author
17 Aug 2006 9:29 PM
nkw
I have an int column for client ID (with unique contraint). Is there a good
way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs
still stay together.

Author
17 Aug 2006 9:49 PM
Chris Lim
nkw wrote:
> I have an int column for client ID (with unique contraint). Is there a good
> way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs
> still stay together.

Why are you posting this again?
Author
18 Aug 2006 1:30 AM
Stopher
Sounds like it is for malicious intent, but I'm sure a simple update
set combo would do it.
nkw wrote:
Show quote
> I have an int column for client ID (with unique contraint). Is there a good
> way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs
> still stay together.
Author
18 Aug 2006 3:43 AM
nkw
It's not for malicious intent. We have some summary reports for our clients
but we cannot let they figure out who is who in the report.

Maybe need some crytography knownledge?

Show quote
"Stopher" wrote:

> Sounds like it is for malicious intent, but I'm sure a simple update
> set combo would do it.
> nkw wrote:
> > I have an int column for client ID (with unique contraint). Is there a good
> > way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs
> > still stay together.
>
>
Author
18 Aug 2006 4:21 AM
Chris Lim
nkw wrote:
> It's not for malicious intent. We have some summary reports for our clients
> but we cannot let they figure out who is who in the report.
>
> Maybe need some crytography knownledge?

What are you exactly trying to do? Perhaps we could suggest alternative
solution if we knew the whole problem.
Author
18 Aug 2006 5:02 AM
Steve Kass
Assuming the other information in the report doesn't give
any clues to who's who, my suggestion is for you to generate
new random integers with binary_checksum(newid())
each time you want to do this:

If your report is the output of a query with one row per
id you want to hide, then you can do something like this:

select
  binary_checksum(newid()) as codedID,
  <all columns of your report with the exception of the id you want to hide>
from <continue as in the query for your report>
order by newid()

If you need to be able to recover the actual ids after generating this
report, include the id you want to hide in the query, but delete that
column from the results when you provide the report to the clients
(keeping the codedID and actual ID columns yourself to enable the
decoding.

Steve Kass
Drew University
www.stevekass.com

Show quote
"nkw" <n**@discussions.microsoft.com> wrote in message news:8A2F91B5-5209-4E31-8A07-04150D68A654@microsoft.com...
> It's not for malicious intent. We have some summary reports for our clients
> but we cannot let they figure out who is who in the report.
>
> Maybe need some crytography knownledge?
>
> "Stopher" wrote:
>
>> Sounds like it is for malicious intent, but I'm sure a simple update
>> set combo would do it.
>> nkw wrote:
>> > I have an int column for client ID (with unique contraint). Is there a good
>> > way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs
>> > still stay together.
>>
>>
Author
18 Aug 2006 5:52 PM
nkw
thanks, that's good suggestion. i also found and used the undocumented
function pwdencrypt.

Show quote
"Steve Kass" wrote:

> Assuming the other information in the report doesn't give
> any clues to who's who, my suggestion is for you to generate
> new random integers with binary_checksum(newid())
> each time you want to do this:
>
> If your report is the output of a query with one row per
> id you want to hide, then you can do something like this:
>
> select
>   binary_checksum(newid()) as codedID,
>   <all columns of your report with the exception of the id you want to hide>
> from <continue as in the query for your report>
> order by newid()
>
> If you need to be able to recover the actual ids after generating this
> report, include the id you want to hide in the query, but delete that
> column from the results when you provide the report to the clients
> (keeping the codedID and actual ID columns yourself to enable the
> decoding.
>
> Steve Kass
> Drew University
> www.stevekass.com
>
> "nkw" <n**@discussions.microsoft.com> wrote in message news:8A2F91B5-5209-4E31-8A07-04150D68A654@microsoft.com...
> > It's not for malicious intent. We have some summary reports for our clients
> > but we cannot let they figure out who is who in the report.
> >
> > Maybe need some crytography knownledge?
> >
> > "Stopher" wrote:
> >
> >> Sounds like it is for malicious intent, but I'm sure a simple update
> >> set combo would do it.
> >> nkw wrote:
> >> > I have an int column for client ID (with unique contraint). Is there a good
> >> > way to scramble the column? bitwise exclusive OR will keep the "neighbor" IDs
> >> > still stay together.
> >>
> >>
>
>
>

AddThis Social Bookmark Button