? Is there any way to get a unique number? (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password
[Help Wanted] SmileBASIC Documentation Project

Is there any way to get a unique number?

  • #1 ✎ 24 DevinF06 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies Is there any way to get a unique number that is at least almost unique to the system? Posted Edited by DevinF06
  • #2 ✎ 274 Shelly
    Is there any way to get a unique number that is at least almost unique to the system?
    No.
    Posted
  • #3 ✎ 229 HTV04 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Avatar Taboo I didn't change my avatar for 180 days Website Forum Contributor Hidden Achievements
    Is there any way to get a unique number that is at least almost unique to the system?
    What are you exactly referring to?
    Posted
  • #4 ✎ 192 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself
    Is there any way to get a unique number that is at least almost unique to the system?
    What are you exactly referring to?
    Probably a unique number for every 3DS, so if I had two 3DSes, they'd have two different codes, and if I had a billion 3DSes, I'd have a billion different codes. This could be done with the MPNAME$() function, but you can easily change that, so it's useless.
    Posted
  • #5 ✎ 197 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies Perhaps generate a pseudorandom value for a system and store it for later use on that system. Posted
  • #6 ✎ 931 Y_ack
    Is there any way to get a unique number that is at least almost unique to the system?
    What are you exactly referring to?
    Probably a unique number for every 3DS, so if I had two 3DSes, they'd have two different codes, and if I had a billion 3DSes, I'd have a billion different codes. This could be done with the MPNAME$() function, but you can easily change that, so it's useless.
    Hashing MPNAME$() is a pretty good idea, but if the question is "can I access a serial number or something" the answer is no.
    Posted
  • #7 ✎ 1619 12Me21 Head Admin Second Year My account is over 2 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself To access MPNAME$, you have to start local multiplayer, which is annoying Posted
  • #8 ✎ 274 Shelly
    Is there any way to get a unique number that is at least almost unique to the system?
    What are you exactly referring to?
    Probably a unique number for every 3DS, so if I had two 3DSes, they'd have two different codes, and if I had a billion 3DSes, I'd have a billion different codes. This could be done with the MPNAME$() function, but you can easily change that, so it's useless.
    Hashing MPNAME$() is a pretty good idea, but if the question is "can I access a serial number or something" the answer is no.
    I agree with what TheV360 said. Using MPNAME$ would provide an extremely weak layer of security. Although, I guess hashing could improve that. I think there's another point to be made, though. Any attempt at security in SmileBASIC would be mildly annoying to deal with, at best. Code can easily be modified, so security in a program can be undone by modifying the code. The BEST attempt at security would probably be using MPNAME$ and CHKFILE() to check the size of the code (making sure it hasn't been modified). But even that can be undone.
    Posted Edited by Shelly
  • #9 ✎ 931 Y_ack
    Using MPNAME$ would provide an extremely weak layer of security.
    When did anyone mention security?
    Posted
  • #10 ✎ 274 Shelly
    Using MPNAME$ would provide an extremely weak layer of security.
    When did anyone mention security?
    Nobody did. I just assumed that's what this was being used for, since that's really the only thing something like this would be useful for.
    Posted Edited by Shelly
  • #11 ✎ 419 kenchic Avatar Taboo I didn't change my avatar for 180 days Website Third Year My account is over 3 years old Website osu! Is Awesome! I love osu! Express Yourself Getting a unique number that will always be the same upon generation per device? No. Absolutely impossible without a hacked version of SB. But making a number that is probably unique once and saving it to the device? Of course. User input + Time + MAINCNT Find some way to turn these into a random seed, and generate a RANDINT or whatever it's called. Chances are, it won't be the same as anyone else's number, making it effectively 'unique.' Posted
  • #12 ✎ 274 Shelly
    Getting a unique number that will always be the same upon generation per device? No. Absolutely impossible without a hacked version of SB. But making a number that is probably unique once and saving it to the device? Of course. User input + Time + MAINCNT Find some way to turn these into a random seed, and generate a RANDINT or whatever it's called. Chances are, it won't be the same as anyone else's number, making it effectively 'unique.'
    That's not the point. A random number wouldn't solve anything, since you need to reproduce it on that 3DS every time (without storing it). For example, if a file is encrypted using the console's unique number as a key you could undo it if you had the 3DS' unique number. If it was encrypted using a random number it would just result in a bunch of garbage once encrypted, with no way to view the original data. Storing that number also wouldn't solve anything.
    Posted Edited by Shelly
  • #13 ✎ 274 Shelly
    Perhaps generate a pseudorandom value for a system and store it for later use on that system.
    If it has to be stored it defeats the purpose. This is most likely going to be used for securing stuff in SBAS, so somebody can't view other people's files. If the number has to be stored the encryption can be undone using the number. The point is to be able to encrypt files without storing a value that can be used to undo it. I think the best idea would be using CHKFILE+MPNAME$ stored on a clipboard (so you don't have to activate multiplayer every time).
    Posted Edited by Shelly