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:
Bug Report, maybe (1997)
Email template names (1997)
WebCat2 beta FTP site (1997)
[WebDNA] Developer Resource Center Redirect (2008)
WebTV problems with WebCatalog?? (1998)
won't serve .tpl (2000)
Database Updates (1997)
Multiple prices (1997)
WebCat vs. ASP (1999)
Deleting Multiple Database Records based on Checkbox (1998)
[WaitForFile] wait for open file, not closed file (2001)
webcat license???? (1997)
[WebDNA] [OT] ImageMagick or similar (2015)
How can I Add several Items into the cart at once? (1997)
WebCat2b15MacPlugin - showing [math] (1997)
lineIndex help... Please (1998)
RE: [WebDNA] ONLY the FIRST continuous run of numeric chars? (2008)
notification solutions (1997)
NT or Mac (1997)
Re:PCS Customer submissions ? (1997)