bip 32 hd wallets – Import private key in HSM Luna SA

I need some clarification on how keys are imported into a HSM Luna SA. I should import BIP 32 private keys of multisign wallets. There are currently two keys: one for the user and one held by the company that would like to start using HSMs.

I start with a general question: is it better to keep all the
individual private keys in the hsm or a single master key that is used
to encrypt the private keys of the wallets?

How are BIP32 keys imported into an HSM? Is the serialized format
Are there any other keys that are needed for the import (wrap for

I accept other advice on implementing the BIP32 with the Luna.

security – Is it safe to use the basic administration with reduced rights for private member space

I know it´s not clearly a technical question, I did not find on the Web (maybe my location makes the job harder).
I have to develop a private member space.
It´s easier for me to use the administration with reduced rights but I´m little scary to make problems of security.
Is it safe to do this or make a private member space only on front-end is a clearly better way to do that ( excluding the question of user interface customizing ) ?

unity – How is the value of transform.position updated and accessed between different private methods?

It sounds to me like you’re confused about the rules for variable scope.

Take a look at this example:

public class Foo {

    // This variable is declared inside the scope of the class.
    // That makes it a "member variable". We allocate one of these variables
    // every time we construct an instance of the class Foo, and it lives
    // and remains accessible as long as that instance does.
    public int memberField;
    // This is a method defined inside the scope of the class.
    // We call it a "member function".
    // The "private" means only code in this class is allowed to call the function.
    private void DoSomething() {
         // Inside this method, we can read and write to members of the class.
         memberField = memberField + 1;    

         // We can also declare "local temporary variables"
         // to help us do our work inside the function.
         int localVariable = memberField + 1;

         if (memberField + localVariable == 7) { 

    private void DoSomethingElse() {
        // Other methods in the class can also read and modify our member variable.
        // They're all accessing the same variable attached to this instance of the class,
        // so changes we make in DoSomething can be seen in DoSomethingElse and vice versa.
        memberField = memberField - 1;

        // But they can't access the temporary variable we declared in DoSomething.
        // localVariable = 3;
        // Uncomment the line above and it will throw an error.
        // We don't have a variable by that name here! (Yet...)

        // We could choose to declare a NEW variable called "localVariable"
        int localVariable = -42;

        // But this has no relationship to the variable in DoSomething.
        // It's a completely different bit of memory that we just called the same name.

// We can define a derived class that inherits from the class Foo above.
public class ChildOfFoo : Foo {

    private DoSomethingChildish() {
        // This class's methods are ALSO allowed to use Foo's member variables,
        // because ChildOfFoo IS a kind of Foo, just a specialized version,
        // So it gets all the public or protected members that Foo had.
        // It's just not allowed to use the ones Foo marked as "private".
        memberField = 0;

So, coming back to your GreenBird example:

transform is a public member variable of MonoBehaviour (or strictly speaking, its grandparent class, Component), and GreenBird derives from MonoBehaviour.

That means all the functions inside GreenBird are allowed to access its member variables, including transform, and the value is shared between them because they’re all looking at the same chunk of memory.

The private in front of our method names just means that other classes aren’t allowed to call them… usually. There’s a special exception for Unity’s MonoBehaviour message functions like Start, Awake, Update, OnMouseDown etc.: Unity looks up these methods using reflection, which works around the normal limitations on who’s allowed to call what.

Deploy Virtual Private Server In Under 5 Minute. Swiss-VPS.

Every Virtual Private Servers we offer includes full root access, enabling you to run whatever you wish whenever you want to.
Easy payments methods!
Best Cheap VPS Server for your online resource! What will you choose: VPS or Shared Hosting? High quality Best Cheap VPS Hosting!
Try now, 100% win-win program

VPS Server Features

-Choose VPS Server Location
-ISPmanager or cPanel
-Linux VPS SSH
-SolusVM Control Panel
-Support Quality
-Windows or Linux OS
-Guaranteed Dedicated RAM
-Instant Setup
-Windows VPS RDP

# 1 Cheap hosting PHP, MySQL and FTP sites

Low price and high quality – inexpensive premium hosting exists! Thanks to our cloud hosting technology, today cheap website hosting with MySQL, FTP and PHP offers more features. Let us help you create and run quality websites while saving money. Almost unlimited cheap website hosting. Try our free hosting service if you are still new to website development.



$9.95/ month
CPU 1хE5-2680
Dedicated RAM 2 GB
Virtualization KVM
Disk Space SSD 20GB
RAID -10 Yes
Setup Fee Free
Bandwidth 2 TB per Month
Port/Uplink 1 Gbit/s
RDP – mstsc.exe Yes
SolusVM Yes
Reboot, Reinstall Yes


$19.95/ month
CPU 2хE5-2680
Dedicated RAM 4 GB
Virtualization KVM
Disk Space SSD 30GB
RAID -10 Yes
Setup Fee Free
Bandwidth 4 TB per Month
Port/Uplink 1 Gbit/s
RDP – mstsc.exe Yes
SolusVM Yes
Reboot, Reinstall Yes

Dedicated Server:

Server E5-2670

$79/ month
CPU Intel® Xeon E5-2670
Dedicated RAM 16 GB
Disk Space SSD 100GB
IP IP’s 1
Bandwidth 10 TB per Month
Switzerland, Zurich
Port/Uplink 1 Gbit/s

Windows VPS


$11.99/ month
CPU 2хE5-2680
Dedicated RAM 1 GB
Virtualization XEN
Disk Space HDD 25GB
RAID -10 Yes
Setup Fee Free
Bandwidth 1 TB per Month
Port/Uplink 1 Gbit/s
RDP – mstsc.exe Yes
SolusVM Yes
Reboot, Reinstall Yes


$89.99/ month
CPU 2хE5-2680
Dedicated RAM 8 GB
Virtualization XEN
Disk Space HDD 150GB
RAID -10 Yes
Setup Fee Free
Bandwidth 6 TB per Month
Port/Uplink 1 Gbit/s
RDP – mstsc.exe Yes
SolusVM Yes
Reboot, Reinstall Yes

Full list of fares:

Our contacts:



sessions – Private tempstore storage contains data for previous anonymous user

I have an issue with private tempstore storage that I wasn’t able to solve. I’ve implemented a webform handler, which populates data in this storage and then I’m creating tokens out of the saved values. This works fine, however, when anonymous user comes to page where token value is used, he/she sees last value saved in to the storage, before his/her session has been created.

This is strange, because setting a value for anonymous user should create a session for user, if it doesn’t exist, yet: Do you have any idea why this happens, please? Should I use module Should I consider using Sessions directly (

linux – resolv.conf issue with two private domains

I have peered private networks and working routing between them, but no DNS forwarding that I know of or that I can easily configure. I need a local linux machine to resolve an FQDN from the other domain. For ex.

  • Domain A — myprivate.local, nameserver
  • Domain B —, nameserver

My auto-generated resolv.conf file is as following:


.. but this doesn’t resolve, i.e.


How should my resolv.conf look? Thank you for your help in advance

gnupg – Retrieving GPG Private Sub-Key ID

I’ve created a GPG keyring as follows:

pub   rsa4096 2020-09-22 (C)
uid           (ultimate) Ryan McClue <>
sub   rsa4096 2020-09-22 (S) (expires: 2021-09-22)
sub   rsa4096 2020-09-22 (E) (expires: 2021-09-22)
sub   rsa4096 2020-09-22 (A) (expires: 2021-09-22)

I export the relevent keys and copy to an encrypted USB:

gpg --armor --export-secret-subkeys $KEY_ID > private-sub-keys.asc

Now, on a new machine I import these keys and assign ultimate trust:

gpg --import private-sub-keys.asc
gpg --edit-key $KEY_ID

Now as I understand it, GPG stores the public and private keys in the same file (roughly speaking). So the commands gpg --list-keys and gpg --list-secret-keys output only the public key id’s. In wanting to setup git to sign my commits using GPG, i.e. git config user.signingkey how do I get access to my private sub key’s id that is responsible for signing?

How can I invite other private users to a private Trello Board?

I’ve setup a private Trello board and wish to invite some private users to it.

But when i click on invite it asks me to setup a team (see screenshot below)

screenshot of Trello invite button

My understanding is Teams are a paid feature of a Business plan. I only want to add private users to a private board so don’t need a Business Plan.

How can I invite other private users to a private Trello Board

Java: way to convert a 256-bit private key to WIF?

You should convert hex representation of bytes to byte array (not String to byte array). Then make hash. Then convert the byte array back to hex representation of bytes in String.

The whole solution will look like:


class HashExample {
    public static void main(String() args) throws NoSuchAlgorithmException {
        String string = "0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D";
        string = "80" + string;
        byte() data = hexStringToByteArray(string);
        byte() digest = MessageDigest.getInstance("SHA-256").digest(hexStringToByteArray(string));
        String result = bytesToHex(digest);
        //prints: 8147786c4d15106333bf278d71dadaf1079ef2d2440a4dde37d747ded5403592

    public static byte() hexStringToByteArray(String s) {
        int len = s.length();
        byte() data = new byte(len / 2);
        for (int i = 0; i < len; i += 2) {
            data(i / 2) = (byte) ((Character.digit(s.charAt(i), 16) << 4)
                    + Character.digit(s.charAt(i+1), 16));
        return data;

    private static String bytesToHex(byte() bytes) {
        StringBuffer result = new StringBuffer();
        for (byte b : bytes) result.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1));
        return result.toString();

Of course this is just example. In production code I recommend to use one of the available libraries which can perform this task.

My private key is not recognized.

There’s many different types and formats for Private Keys.

For example, a single address private key(WIF) should look like:


other types:

  • Hierarchical Deterministic (HD) Wallet Keys

Wallet software may use a BIP 32 seed to generate many private keys and corresponding public keys from a single secret value. This is called a hierarchical deterministic wallet, or HD wallet for short. The seed value, or master extended key, consists of a 256-bit private key and a 256-bit chain code, for 512 bits in total. The seed value should not be confused with the private keys used directly to sign Bitcoin transactions.



  • Mnemonic phrase
    A mnemonic phrase, mnemonic recovery phrase or mnemonic seed is a list of words which store all the information needed to recover a Bitcoin wallet. Wallet software will typically generate a mnemonic backup phrase and instruct the user to write it down on paper. If the user’s computer breaks or their hard drive becomes corrupted, they can download the same wallet software again and use the paper backup to get their bitcoins back.

Base58 Wallet Import format

When importing or sweeping ECDSA private keys, a shorter format known
as wallet import format is often used, which offers a few advantages.
The wallet import format is shorter, and includes built-in error
checking codes so that typos can be automatically detected and/or
corrected (which is impossible in hex format) and type bits indicating
how it is intended to be used. Wallet import format is the most common
way to represent private keys in Bitcoin. For private keys associated
with uncompressed public keys, they are 51 characters and always start
with the number 5 on mainnet (9 on testnet). Private keys associated
with compressed public keys are 52 characters and start with a capital
L or K on mainnet (c on testnet).

  • Mini private key format Some applications use the mini private key format.

Not every private key or Bitcoin address has a corresponding
mini private key – they have to be generated a certain way in order to
ensure a mini private key exists for an address. The mini private key
is used for applications where space is critical, such as in QR codes
and in physical bitcoins. The above example has a mini key, which is:

You should know which private key they’re asking for and you are sending the correct one.

Importing private address key (WIF) command should be like that:

importprivkey yourPrivateKeyInWalletImportFormat "TheLabelThatIWant"