Author

Topic: IOTA - page 721. (Read 1473405 times)

legendary
Activity: 2142
Merit: 1010
Newbie
November 30, 2015, 09:24:13 AM
I have just recalled, in the release version 81 char address will be appended with 9 chars of the checksum (to detect mistyped addresses).
legendary
Activity: 2142
Merit: 1010
Newbie
November 30, 2015, 09:14:59 AM
Thank you!

EDIT

I'll play around with this today and see what I can do.  Also, if I write a Vanitygen, I'll see about translating this code to C#.  Why?  For two reasons, it's been my experience that (well written) C# tends to run faster than Java.  Hey, not trying to start a trolling bear fight, it's just my experience.

And, second, I have over 10 years experience in C# since it's the language of most businesses.  I'm way more familiar with it than anything else, which even I find unfortunate.

If I come up with anything useful, I'll post the project to Github.

Interesting. C# being faster likely means that its JIT compiler is better...

Vanitygen should take into account that a single account should be used as fewer times as possible, preferably only once. It's a side-effect of lazy users penalty.
rlh
hero member
Activity: 804
Merit: 1004
November 30, 2015, 09:06:40 AM
Thank you!

EDIT

I'll play around with this today and see what I can do.  Also, if I write a Vanitygen, I'll see about translating this code to C#.  Why?  For two reasons, it's been my experience that (well written) C# tends to run faster than Java.  Hey, not trying to start a trolling bear fight, it's just my experience.

And, second, I have over 10 years experience in C# since it's the language of most businesses.  I'm way more familiar with it than anything else, which even I find unfortunate.

If I come up with anything useful, I'll post the project to Github.
legendary
Activity: 2142
Merit: 1010
Newbie
November 30, 2015, 09:05:13 AM
CfB, can you post the Java code to github for address creation?  Some of us would like to go ahead and get our vanity addresses locked and loaded before the coin release. Wink

The code is too small to bother with Github - http://188.138.57.93/atoi.java

Code:
import com.sun.net.httpserver.HttpServer;

import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.util.Arrays;

public class atoi {

    private static final int[] INDICES = new int[729];
    private static final int[] F = {0, -1, 1, 0, 1, -1, -1, 1, 0};
    private static final String tryteLetters = "9abcdefghijklmnopqrstuvwxyz";
    private static final int[][] tryteTrits = {

            {0, 0, 0},
            {1, 0, 0},
            {-1, 1, 0},
            {0, 1, 0},
            {1, 1, 0},
            {-1, -1, 1},
            {0, -1, 1},
            {1, -1, 1},
            {-1, 0, 1},
            {0, 0, 1},
            {1, 0, 1},
            {-1, 1, 1},
            {0, 1, 1},
            {1, 1, 1},
            {-1, -1, -1},
            {0, -1, -1},
            {1, -1, -1},
            {-1, 0, -1},
            {0, 0, -1},
            {1, 0, -1},
            {-1, 1, -1},
            {0, 1, -1},
            {1, 1, -1},
            {-1, -1, 0},
            {0, -1, 0},
            {1, -1, 0},
            {-1, 0, 0}
    };

    static {

        int index = 0;
        for (int i = 0; i < 729; i++) {

            INDICES[i] = index += index <= 364 ? 364 : -365;
        }
    }

    private static int[] digest(final int[] message) {

        final int[] state = new int[729];
        System.arraycopy(message, 0, state, 0, message.length);
        transform(state);

        return Arrays.copyOf(state, 243);
    }

    private static void transform(final int[] state) {

        final int[] leftPart = new int[729], rightPart = new int[729];
        int index = 0;
        for (int round = 9; round-- > 0; ) {

            for (int i = 0; i < 729; i++) {

                final int a, b;
                leftPart[i] = f(a = state[index], b = state[index = INDICES[i]]);
                rightPart[i] = f(b, a);
            }

            for (int i = 0; i < 729; i++) {

                state[i] = f(leftPart[index], rightPart[index = INDICES[i]]);
            }
        }
    }

    private static int f(final int a, final int b) {

        return F[a + a + a + b + 4];
    }

    public static void main(final String[] args) throws Exception {

        final HttpServer server = HttpServer.create(new InetSocketAddress(9999), 0);
        server.createContext("/", (exchange) -> {

            // Fetch lowercase latin letters and '9' from the request into a seed
            final StringBuilder seed = new StringBuilder();
            for (final char tryteLetter : exchange.getRequestURI().getPath().toCharArray()) {

                if (tryteLetters.indexOf(tryteLetter) >= 0) {

                    seed.append(tryteLetter);
                }
            }

            // Check if there are exactly 81 chars in the seed
            final String response;
            if (seed.length() != 81) {

                // Inform the user that something is wrong with their seed
                response = "Seed length is " + seed.length() + ", must be 81!";

            } else {

                // Translate the seed chars into trits
                int[] seedTrits = new int[243];
                int offset = 0;
                for (final char tryteLetter : seed.toString().toCharArray()) {

                    System.arraycopy(tryteTrits[tryteLetters.indexOf(tryteLetter)], 0, seedTrits, offset, 3);
                    offset += 3;
                }

                // Derive private key fragments from the seed
                final int[][] key = new int[27][];
                final int[] scratchpad = new int[seedTrits.length];
                for (int i = 0; i < key.length; i++) {

                    System.arraycopy(i == 0 ? seedTrits : key[i - 1], 0, scratchpad, 0, scratchpad.length);
                    key[i] = digest(scratchpad);
                }

                // Truncate the private key fragments to 81 trits each
                for (int i = 0; i < key.length; i++) {

                    key[i] = Arrays.copyOf(key[i], 81);
                }

                // Derive public key fragments from the private key fragments, keep them truncated to 81 trits each
                for (int i = 0; i < key.length; i++) {

                    for (int j = 0; j < 27; j++) {

                        key[i] = Arrays.copyOf(digest(key[i]), 81);
                    }
                }

                // Derive a public key from the public key fragments
                final int[] state = new int[729];
                for (int i = 0; i < key.length; ) {

                    System.arraycopy(key[i++], 0, state, 0, 81);
                    System.arraycopy(key[i++], 0, state, 81, 81);
                    System.arraycopy(key[i++], 0, state, 162, 81);
                    transform(state);
                }

                // Negate the trits of the seed
                for (int i = 0; i < seedTrits.length; i++) {

                    seedTrits[i] = -seedTrits[i];
                }

                // Derive a checkpointing key from the seed
                for (int i = 0; i < 12 * 24 * 366; i++) {

                    seedTrits = digest(seedTrits);
                }

                // Translate the keys into text
                final StringBuilder publicKey = new StringBuilder(), checkpointingKey = new StringBuilder();
                for (int i = 0; i < 243; i += 3) {

                    int tryteValue = state[i] + state[i + 1] * 3 + state[i + 2] * 9;
                    if (tryteValue < 0) {

                        tryteValue += 27;
                    }
                    publicKey.append(tryteLetters.charAt(tryteValue));

                    tryteValue = seedTrits[i] + seedTrits[i + 1] * 3 + seedTrits[i + 2] * 9;
                    if (tryteValue < 0) {

                        tryteValue += 27;
                    }
                    checkpointingKey.append(tryteLetters.charAt(tryteValue));
                }

                // Output the keys in a format suitable for copy-pasting
                response = (publicKey.toString() + "_" + checkpointingKey.toString()).toUpperCase();
            }

            // Send the response
            exchange.sendResponseHeaders(200, response.length());
            final OutputStream outputStream = exchange.getResponseBody();
            outputStream.write(response.getBytes("UTF-8"));
            outputStream.close();
        });
        server.start();
    }
}
rlh
hero member
Activity: 804
Merit: 1004
November 30, 2015, 09:02:32 AM
CfB, can you post the Java code to github for address creation?  Some of us would like to go ahead and get our vanity addresses locked and loaded before the coin release. Wink
legendary
Activity: 2142
Merit: 1010
Newbie
November 30, 2015, 09:02:07 AM
For me it would a little bit a conflict of interest if the founders will invest a lot. Example, imagine the founders are just CfB and iotatoken. So the Bitcoin-Pott at the very end will get halved. 50% for CfB 50% for iototoken. Imagine now the average joe will invest overall 500 Bitcoin during the sale. And CfB and iototoken just decide to invest 2000 Bitcoin each. So Overall Investment 4’500 Bitcoin. CfB and iotatoken will controll 88% of all iota and the Bitcoin they invested the would get anyway back. Possible. So I think it would help if both are quite open about their own investments, because it’s somehow left pocket – right pocket, they don’t have really costs, if they throw something in the Bitcoinbasket – it’s anyway theirs.

Valid point. All that you can do is to ask others to reveal their transactions and you will get upper bound for amount put by me and iotatoken.
rlh
hero member
Activity: 804
Merit: 1004
November 30, 2015, 09:01:14 AM
So I would ask, why aren't you buying more?

You don't know if I already bought or waiting for the 3rd of Dec.

Yes, I suspect that many will wait closer to the end of the sale so they can make an educated guess as to how much they will need to spend to get the 1, 5 or 10% (!!!) they may desire.

Also, this isn't an accusation, but with any bitcoin/crypto related ICO (or token sale,) you never know if the makers have made stealth purchases since transactions can be anonymous.  Who knows if CfB, iotatoken, or any other unknown insider has already deposited 100BTC, from 10 different accounts.

Again, this isn't an accusation but since this is anonymous, you pretty much can only vouch for the shares you've purchased yourself, or shares purchased with fund coming from from known, public BTC/Nxt accounts.
legendary
Activity: 1120
Merit: 1000
November 30, 2015, 09:00:56 AM
Ofcourse I don't know. Will see how low or high the number will be by then.
legendary
Activity: 2142
Merit: 1010
Newbie
November 30, 2015, 08:56:23 AM
So I would ask, why aren't you buying more?

You don't know if I already bought or waiting for the 3rd of Dec.
newbie
Activity: 53
Merit: 0
November 30, 2015, 07:57:35 AM
For me it would a little bit a conflict of interest if the founders will invest a lot. Example, imagine the founders are just CfB and iotatoken. So the Bitcoin-Pott at the very end will get halved. 50% for CfB 50% for iototoken. Imagine now the average joe will invest overall 500 Bitcoin during the sale. And CfB and iototoken just decide to invest 2000 Bitcoin each. So Overall Investment 4’500 Bitcoin. CfB and iotatoken will controll 88% of all iota and the Bitcoin they invested the would get anyway back. Possible. So I think it would help if both are quite open about their own investments, because it’s somehow left pocket – right pocket, they don’t have really costs, if they throw something in the Bitcoinbasket – it’s anyway theirs.
Moreover, probaly many crypto IPOs were already abused this way.
rlh
hero member
Activity: 804
Merit: 1004
November 30, 2015, 07:56:30 AM
Are you walking with pocket TVsets, guys? My phone has 84x48 resolution.  Grin




Well, I'll give it to you.  No one will be hacking that thing!
full member
Activity: 165
Merit: 100
November 30, 2015, 07:10:20 AM
For me it would a little bit a conflict of interest if the founders will invest a lot. Example, imagine the founders are just CfB and iotatoken. So the Bitcoin-Pott at the very end will get halved. 50% for CfB 50% for iototoken. Imagine now the average joe will invest overall 500 Bitcoin during the sale. And CfB and iototoken just decide to invest 2000 Bitcoin each. So Overall Investment 4’500 Bitcoin. CfB and iotatoken will controll 88% of all iota and the Bitcoin they invested the would get anyway back. Possible. So I think it would help if both are quite open about their own investments, because it’s somehow left pocket – right pocket, they don’t have really costs, if they throw something in the Bitcoinbasket – it’s anyway theirs.
legendary
Activity: 1120
Merit: 1000
November 30, 2015, 06:59:16 AM
Come-from-Beyond, I think you said that you and the team will be buying IOTA tokens from your personal funds. And I believe you also said that you will buy as much as you can, because IOTA is that good.

So far 220 Bitcoins have been invested. I don't know if you can consider this "selling like hotcakes", but it seems on the low side to me.

So I would ask, why aren't you buying more?
legendary
Activity: 2142
Merit: 1010
Newbie
November 30, 2015, 04:36:37 AM
I guess it's time to get a new phone.

Aye, going to buy one with Jinn processor, ARM is vulnerable to viruses and contains NSA backdoor.
sr. member
Activity: 371
Merit: 250
November 30, 2015, 04:18:16 AM
1920x1080

(http://stats.areppim.com/stats/stats_mobiresxtime.htm - some stats about screen resolution on mobile phones)
hero member
Activity: 714
Merit: 500
November 30, 2015, 01:45:50 AM
I would like to ask something . If someone has only wallet in poloniex can take part in the crowdsale ? If not what online wallet can he use ?

Blockchain.info
hero member
Activity: 1111
Merit: 588
November 30, 2015, 01:35:05 AM
I would like to ask something . If someone has only wallet in poloniex can take part in the crowdsale ? If not what online wallet can he use ?
hero member
Activity: 714
Merit: 500
November 30, 2015, 12:33:13 AM

I don't have Android or iOS phone. Can I still invest in IOTA?

Yes.
legendary
Activity: 1181
Merit: 1018
November 30, 2015, 12:28:48 AM

I don't have Android or iOS phone. Can I still invest in IOTA?
legendary
Activity: 1470
Merit: 1004
November 29, 2015, 11:24:19 PM
Are you walking with pocket TVsets, guys? My phone has 84x48 resolution.  Grin

I guess it's time to get a new phone.
Jump to: