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:
I'm new be kind (1997)
CMSBuilder (2004)
graphics server, SSL, Netscape 4.0 (off topic) (1998)
Updating Integer value in DB (2007)
[OT] Google Info (2004)
email problem (1998)
[WebDNA] Can't see were it's wrong.... (2017)
[WebDNA] Problem saving returned value as a variable (2012)
Search Questions (2000)
WebCatalog for guestbook ? (1997)
Nested tags count question (1997)
[WebDNA] WebDNA 7 (2011)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Surprise x and y post args (1998)
using showpage and showcart commands (1996)
Pop-up menu (1998)
WebCatalog for Postcards ? (1997)
Date Formats (1997)
shownext example (2001)
emailer stuck (1997)