---
title: "init(compactRepresentable:)"
framework: cryptokit
role: symbol
role_heading: Initializer
path: "cryptokit/p256/signing/privatekey/init(compactrepresentable:)"
---

# init(compactRepresentable:)

Creates a random P-256 private key for signing.

## Declaration

```swift
init(compactRepresentable: Bool = true)
```

## Parameters

- `compactRepresentable`: A Boolean value that indicates whether CryptoKit creates the key with the structure to enable compact point encoding.

## Discussion

Discussion Keys that use a compact point encoding enable shorter public keys, but aren’t compliant with FIPS certification. If your app requires FIPS certification, create a key with init(rawRepresentation:).

## See Also

### Creating a private key

- [init(rawRepresentation:)](cryptokit/p256/signing/privatekey/init(rawrepresentation:).md)
- [init(derRepresentation:)](cryptokit/p256/signing/privatekey/init(derrepresentation:).md)
- [init(pemRepresentation:)](cryptokit/p256/signing/privatekey/init(pemrepresentation:).md)
- [init(x963Representation:)](cryptokit/p256/signing/privatekey/init(x963representation:).md)
