Re: encryption madness
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 59835
interpreted = N
texte = Single [URL]ing encrypted data is often not enough. Certain sequences =of [URL]ized random characters can still cause parse errors when the =data is passed in the query string (or retrieved from a db file) and =[UnUrl]ed. So it is a good practice to always double URL your encrypted =string. I.E. [text show=3Dt]encr=3D[url][url][encrypt =seed=3D1664][source][/encrypt][/url][/url]Now here is where may get confusing for those who have not used the =[encryption]/[decryption] contexts very often...After the encrypted string has been [URL]ed twice, decrypting the string =may only require a SINGLE [UnURL] action. This is because an 'implicit' =[UnURL] may have already occurred when retrieving the encrypted data. =For example, when the encrypted data is retrieved from an HTTP form post =(or QueryString), or when the encrypted data is retrieved from a =database.Given this information, your test template should contain something like =this:[if "[source]"=3D"[raw][source][/raw]"][then]source =3D [text show=3Dt]source=3Dnouser[/text]
final =3D [text show=3Dt]final=3Dnouser[/text]
count =3D [math show=3Dt]count=3D1[/math]
encrypt source =3D [text show=3Dt]encr=3D[url][url][encrypt =seed=3D1664][source][/encrypt][/url][/url][/text] (value for link)
[/then][else]source =3D [text show=3Dt]source=3D[source][/text]
final =3D [final]
count =3D [math show=3Dt]count=3D[count]+1[/math]
decrypt previous =3D [text show=3Dt]decr=3D[decrypt =seed=3D1664][unurl][encr][/unurl][/decrypt][/text]
encrypt source =3D [text show=3Dt]encr=3D[url][url][encrypt =seed=3D1664][decr][/encrypt][/url][/url][/text] (value for link)
[/else][/if]newfinal =3D [text show=3Dt]newfinal=3D[decrypt =seed=3D1664][unurl][unurl][encr][/unurl][/unurl][/decrypt][/text]
[if ("[source]"=3D"[final]") & ("[source]"!"")][then]ok -
next[/then][else]failed[/else][/if]Note that the [decr] value only requires a single [UnURL] action, as the =encrypted value will have already gone through one implicit UnURL =action. But the 'newfinal' still requires a double [unurl] action, =since the [encr] value is being used directly, and has not been 'passed' =or 'retrieved' by some other means.-----Original Message-----From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf OfThierry AlmySent: Monday, November 01, 2004 12:41 PMTo: WebDNA TalkSubject: encryption madnessI'm trying to figure out how the encryption/decryption works but I'm=20getting crazy ...I made a small template that encrypts and urls a value, then it uses=20a link to pass it to itself, decrypt and encrypt it again. Finally it=20checks if the source value and the final value are the same ... and=20so on.I can make between 3 and 15 turns, then it fails.Here's the code. I don't know what I'm doing wrong ...Thierry
|
[if "[source]"=3D"[raw][source][/raw]"][then]source =3D [text show=3Dt]source=3Dnouser[/text] final =3D [text show=3Dt]final=3Dnouser[/text] count =3D [math show=3Dt]count=3D1[/math] encrypt source =3D [text show=3Dt]encr=3D[url][encrypt=20seed=3D1664][source][/encrypt][/url][/text] (value for link) [/then][else]source =3D [text show=3Dt]source=3D[source][/text] final =3D [final] count =3D [math show=3Dt]count=3D[count]+1[/math] decrypt previous =3D [text show=3Dt]decr=3D[decrypt=20seed=3D1664][unurl][encr][/unurl][/decrypt][/text] encrypt source =3D [text show=3Dt]encr=3D[url][encrypt=20seed=3D1664][decr][/encrypt][/url][/text] (value for link) [/else][/if]newfinal =3D [text show=3Dt]newfinal=3D[decrypt=20seed=3D1664][unurl][encr][/unurl][/decrypt][/text]
[if ("[source]"=3D"[final]") & ("[source]"!"")][then]ok - next[/then][else]failed[/else][/if] |
-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to =Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Single [url]ing encrypted data is often not enough. Certain sequences =of [url]ized random characters can still cause parse errors when the =data is passed in the query string (or retrieved from a db file) and =[unurl]ed. So it is a good practice to always double URL your encrypted =string. I.E. [text show=3Dt]encr=3D[url][url][encrypt =seed=3D1664][source][/encrypt][/url][/url]Now here is where may get confusing for those who have not used the =[encryption]/[decryption] contexts very often...After the encrypted string has been [url]ed twice, decrypting the string =may only require a SINGLE [unurl] action. This is because an 'implicit' =[unurl] may have already occurred when retrieving the encrypted data. =For example, when the encrypted data is retrieved from an HTTP form post =(or QueryString), or when the encrypted data is retrieved from a =database.Given this information, your test template should contain something like =this:[if "[source]"=3D"[raw][source][/raw]"][then]source =3D [text show=3Dt]source=3Dnouser[/text]
final =3D [text show=3Dt]final=3Dnouser[/text]
count =3D [math show=3Dt]count=3D1[/math]
encrypt source =3D [text show=3Dt]encr=3D[url][url][encrypt =seed=3D1664][source][/encrypt][/url][/url][/text] (value for link)
[/then][else]source =3D [text show=3Dt]source=3D[source][/text]
final =3D [final]
count =3D [math show=3Dt]count=3D[count]+1[/math]
decrypt previous =3D [text show=3Dt]decr=3D[decrypt =seed=3D1664][unurl][encr][/unurl][/decrypt][/text]
encrypt source =3D [text show=3Dt]encr=3D[url][url][encrypt =seed=3D1664][decr][/encrypt][/url][/url][/text] (value for link)
[/else][/if]newfinal =3D [text show=3Dt]newfinal=3D[decrypt =seed=3D1664][unurl][unurl][encr][/unurl][/unurl][/decrypt][/text]
[if ("[source]"=3D"[final]") & ("[source]"!"")][then]ok - [thisurl]?source=3D[source]&final=3D[newfinal]&encr=3D[encr]&coun=t=3D[count]">next[/then][else]failed[/else][/if]Note that the [decr] value only requires a single [unurl] action, as the =encrypted value will have already gone through one implicit UnURL =action. But the 'newfinal' still requires a double [unurl] action, =since the [encr] value is being used directly, and has not been 'passed' =or 'retrieved' by some other means.-----Original Message-----From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf OfThierry AlmySent: Monday, November 01, 2004 12:41 PMTo: WebDNA TalkSubject: encryption madnessI'm trying to figure out how the encryption/decryption works but I'm=20getting crazy ...I made a small template that encrypts and urls a value, then it uses=20a link to pass it to itself, decrypt and encrypt it again. Finally it=20checks if the source value and the final value are the same ... and=20so on.I can make between 3 and 15 turns, then it fails.Here's the code. I don't know what I'm doing wrong ...Thierry |
[if "[source]"=3D"[raw][source][/raw]"][then]source =3D [text show=3Dt]source=3Dnouser[/text] final =3D [text show=3Dt]final=3Dnouser[/text] count =3D [math show=3Dt]count=3D1[/math] encrypt source =3D [text show=3Dt]encr=3D[url][encrypt=20seed=3D1664][source][/encrypt][/url][/text] (value for link) [/then][else]source =3D [text show=3Dt]source=3D[source][/text] final =3D [final] count =3D [math show=3Dt]count=3D[count]+1[/math] decrypt previous =3D [text show=3Dt]decr=3D[decrypt=20seed=3D1664][unurl][encr][/unurl][/decrypt][/text] encrypt source =3D [text show=3Dt]encr=3D[url][encrypt=20seed=3D1664][decr][/encrypt][/url][/text] (value for link) [/else][/if]newfinal =3D [text show=3Dt]newfinal=3D[decrypt=20seed=3D1664][unurl][encr][/unurl][/decrypt][/text]
[if ("[source]"=3D"[final]") & ("[source]"!"")][then]ok - [thisurl]?source=3D[source]&final=3D[newfinal]&encr=3D[encr]&coun=t=3D[count]">next[/then][else]failed[/else][/if] |
-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to =Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
"Scott Anderson"
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Fun with dates (1997)
WebDelivery: One step closer !! (1997)
Emailer or [sendmail] questions ... (1998)
Generating Report Totals (1997)
Orders w/in [sendmail] (1998)
WebCatalog + Linux + ODBC + Oracle ! ? (2000)
Emailer (1997)
Multiple Passwords (1997)
read and write you own cookies with webcat (1997)
Error Lob.db records error message not name (1997)
Multiple Ad databases? (1997)
authenticating a second user (1997)
Setting up shop (1997)
WEBCAT with SQL backend. Help please! (2000)
OSX 10.2.6/iTools 7.0/WebDNA 5.0 installation (2003)
Problems with [Applescript] (1997)
WebCatalog can't find database (1997)
New Command prefs ... (1997)
Need help with text area (1998)
b18 problem on NT 4.0 (1997)